Jump to content

omidbrb

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

omidbrb's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. That's exactly what I'm asking. I wrote this piece of code from what I learned about XSS attacks. I don't know what I'm missing.
  2. Thanks. Just wanted to make sure I've patched all the doors!
  3. Hello Everyone, I'm facing a website which is quite badly written, with register_globals turned on and I don't have the time to go through the code and secure the website. Do you think including the following code (that works) above every page in the website will secure the website from cross-site scripting attacks? It's actually scanning all _GET and _SET variables that PHP has turned into variables: foreach(array_keys($_GET) as $kk) { $$kk = htmlspecialchars($$kk); $$kk = str_replace("shell_exec", "little_bunny", $$kk); $$kk = str_replace("exec", "little_bunny", $$kk); $$kk = str_replace("javascript", "evil_bunny", $$kk); } foreach(array_keys($_POST) as $kk) { $$kk = htmlspecialchars($$kk); $$kk = str_replace("shell_exec", "little_bunny", $$kk); $$kk = str_replace("exec", "little_bunny", $$kk); $$kk = str_replace("javascript", "evil_bunny", $$kk); } Best, Omid
×
×
  • 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.