Post: New Non-Vulnerable Screensnapr Script
12-14-2011, 01:47 AM #1
0B4M4
Priv8Root 0wner!
(adsbygoogle = window.adsbygoogle || []).push({}); Hey guys. As you have noticed, the old screensnapr script was vulnerable. A hacker can add a direct URL to the end of ?img= to upload a shell. I will show you how to fix that vulnerability.

Replace this code:
Originally posted by another user
<?php
$img = $_GET["img"];
?>

<?php
if($img=="") { echo ""; } else { echo "<img src='" . $img . "' />"; } ?>


With this code:
Originally posted by another user
<?php
// DELINK a variable
function remove_http($url = ''Winky Winky
{
if ($url == 'https://' OR $url == 'https://' OR $url ==
'www'Winky Winky
{
return $url;
}
$matches = substr($url, 0, 7);
if ($matches=='https://')
{
$url = substr($url, 7);
}
else
{
$matches = substr($url, 0, Cool Man (aka Tustin);
if ($matches=='https://')
$url = substr($url, Cool Man (aka Tustin);
}
return $url;
}

$img = remove_http(strip_tags($_GET["img"]));

if($img=="") { echo ""; } else { echo "<img src='" . $img . "' />"; }

?>
(adsbygoogle = window.adsbygoogle || []).push({});

The following user thanked 0B4M4 for this useful post:

Jeremy
12-14-2011, 01:48 AM #2
Default Avatar
Cade
Guest
or replace it with urlencode :fa:

The following user thanked Cade for this useful post:

Jeremy
12-14-2011, 03:14 AM #3
0B4M4
Priv8Root 0wner!
Both work. But I think this is more secure.
12-14-2011, 03:20 AM #4
HolyHitmanz
Save Point
Nice Work Dude I might even make my own screensnapr Cool Troll just to try it
12-14-2011, 05:59 AM #5
damn why did you tell these noobs? :yuno:

I was hacking everyone's screen snapr :happycry:

atleast you can keep ngu safe :y:, now off to hack pvhax screen snapr noobs stare
12-14-2011, 09:42 PM #6
FoxkaZ
Retired Super
Originally posted by 0B4M4 View Post
Hey guys. As you have noticed, the old screensnapr script was vulnerable. A hacker can add a direct URL to the end of ?img= to upload a shell. I will show you how to fix that vulnerability.

Replace this code:


With this code:


Moved to the correct section. :y:
12-16-2011, 01:44 AM #7
Pichu
RIP PICHU.
Originally posted by 0B4M4 View Post
Hey guys. As you have noticed, the old screensnapr script was vulnerable. A hacker can add a direct URL to the end of ?img= to upload a shell. I will show you how to fix that vulnerability.

Replace this code:


With this code:
You're shitting me, I

could have been uploading a shell to people just by doing that.. well thank you for telling me. Smile
12-16-2011, 03:23 AM #8
You were probably better off just posting the vulnerability instead of the fix lol

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo