Jump to content

jargen

Members
  • Posts

    25
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

jargen's Achievements

Member

Member (2/5)

0

Reputation

  1. Thanks for all the help mate, just re-coded it to PBO.
  2. My concern is simply the fact, that a new security feature will come out, or something which you are advised to add. Like when mysqli was added and preparing statements (Compared to just using escape string before). I could have potentially hundreds of queries to lock down instead of one. What do you suggest in regards to that?
  3. Hey guys Slightly lost on how to do this one. Im trying to make a function which will insert data into a MySQL table. But im trying to make it universal, so i can use the same function for any part of the application, so theres only one mysql query i need to secure, rather then hundreds across the entire site. I know how i can make it go to the right table and such, my problem is how do i make it add the array of values to insert, when i have no idea how long it will be? Struggling to find a clear method online
  4. Dosent help work out how to get the Process ID and stop it.
  5. I need a way to start a program and store the PID, then manage to stop it at the users request later. Im not sure how i would go about this. It has to work on Windows, Any help? Thanks.
  6. The test code is $password = generatepassword(); $passwordsafe = encryptdata($password,"dddsgsdfnhjkdgh"); $test = decryptdata($passwordsafe, "dddsgsdfnhjkdgh"); print($password." ".$passwordsafe." ".$test); So i dont understand what is happening
  7. Hi, Im using this code: function encryptdata($data_input,$key){ $td = mcrypt_module_open('cast-256', '', 'ecb', ''); $iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($td), MCRYPT_RAND); mcrypt_generic_init($td, $key, $iv); $encrypted_data = mcrypt_generic($td, $data_input); mcrypt_generic_deinit($td); mcrypt_module_close($td); $encoded_64=base64_encode($encrypted_data); return $encoded_64; } function decryptdata($encoded_64,$key){ $decoded_64=base64_decode($encoded_64); $td = mcrypt_module_open('cast-256', '', 'ecb', ''); $iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($td), MCRYPT_RAND); mcrypt_generic_init($td, $key, $iv); $decrypted_data = mdecrypt_generic($td, $decoded_64); mcrypt_generic_deinit($td); mcrypt_module_close($td); return $decrypted_data; } To try to encrypt and decrypt some data, However the decrypted password has the first 2 letters missing. Whatever length string i put in its always the first 2 letters that go missing. I have tried multiple pieces of code over the internet with the exact same problem. Example: (Original Password, Encrypted Password, Decrypted Password) BEBw3nJ9rT y3CdmtNeTmhO3Jrq/00YOA== Bw3nJ9rT Any help? Thanks. P.s Yes i am using the same key for the encryption and decryption.
  8. My code is: SELECT * FROM wp_newsoptions WHERE option='often' I am running it via the sql query in phpmyadmin.
  9. All i get is a syntax error. #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'option="often" LIMIT 0, 30' at line 1
  10. Whenever i try this code i get a syntax error. Any help? SELECT * FROM wp_newsoptions WHERE option='often'
  11. Aha sorted it. Needed to change the permissions on the root dir
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.