Welcome Guest, Not a member yet? Register   Sign In
Help with Encryption...
#1

[eluser]drbigfresh[/eluser]
I am trying to help someone get some data out of a system that was designed using codeigniter. The originaly developer is long gone, and I am only somewhat familiar with codeigniter. For some reason the developer encrypted almost everything that went into the database, and I am now trying to decrypt one of the tables.
I know he was calling $this->load->library('encrypt'); and I have the encryption_key. My question is, how can I create a php page that will get all the info from my table (member_info) and display it unencrypted? Any help anyone can provide is greatly appreciated.

Thanks!
#2

[eluser]meigwilym[/eluser]
Try...

Code:
$this->load->library('encrypt');
$this->load->library('database');

$sql = "SELECT * FROM member_info ;";
$query = $this->db->query($sql);

$table = '<table>';

foreach ($query->result() as $row)
{
   $table .= '<tr>';
   $table .= $this->encrypt->decode($row->title);
   $table .= $this->encrypt->decode($row->name);
   $table .= $this->encrypt->decode($row->email);
   $table .= $this->encrypt->decode($row->etc);
   $table .= $this->encrypt->decode($row->etc);
   // replace with the fieldnames
   $table .= '</tr>';
}

$table .= '</table>';

echo $table;




Theme © iAndrew 2016 - Forum software by © MyBB