"Hacking" Sign Script

DDRtists

ɹoʇɐɹǝpoɯ ɹǝdns
Reaction score
415
Made by request, too lazy to make a guy with a sign ( Someone make me one, and I'll make the script for it. :) ).

It requires the GD Module, but that comes with most PHP Distributions. ( Though, Your host has to enable it... ).
Please don't link to my image, I don't need the added Bandwidth loss. :p

Right Now, it looks like:
MakeSign.php


I'm sure you can edit it, though. ;)

Script:
PHP:
<?

$os = get_os_name($_SERVER['HTTP_USER_AGENT']);
$ip = GetHostByName($REMOTE_ADDR);
$using = get_browser_name($_SERVER['HTTP_USER_AGENT']);
if($os == 'Unknown') $OSString = 'Hmm, I guess you have a leet OS!';
if($os != 'Unknown') $OSString = 'Your OS is '.$os.'!';
if($using == 'Unknown') $BString = 'Hmm, I guess you have a leet Browser!';
if($using != 'Unknown') $BString = 'Your Browser is '.$using.'!';
$IPString = 'Your IP is '.$ip.'!';

header("content-type: image/png");
$im = imagecreate(400,80);
$black = imagecolorallocate($im,0,0,0);
$white = imagecolorallocate($im,255,255,255);
imagefill($im,0,0,$black);
imagestring($im,12,10,10,$OSString,$white);
imagestring($im,12,10,30,$BString,$white);
imagestring($im,12,10,50,$IPString,$white);
imagepng($im);
imagedestroy($im);	
	
function get_os_name($user_agent)
{

$oses = array (
	'Windows 3.11' => 'Win16',
	'Windows 95' => '(Windows 95)|(Win95)|(Windows_95)',
	'Windows 98' => '(Windows 98)|(Win98)',
	'Windows 2000' => '(Windows NT 5.0)|(Windows 2000)',
	'Windows XP' => '(Windows NT 5.1)|(Windows XP)',
	'Windows 2003' => '(Windows NT 5.2)',
	'Windows NT 4.0' => '(Windows NT 4.0)|(WinNT4.0)|(WinNT)|(Windows NT)',
	'Windows ME' => 'Windows ME',
	'Open BSD'=>'OpenBSD',
	'Sun OS'=>'SunOS',
	'Linux'=>'(Linux)|(X11)',
	'Macintosh'=>'(Mac_PowerPC)|(Macintosh)',
	'QNX'=>'QNX',
	'BeOS'=>'BeOS',
	'OS/2'=>'OS/2',
	'Search Bot'=>'(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp/cat)|(msnbot)|(ia_archiver)'
);

 
foreach($oses as $os=>$pattern)
{
	if (eregi($pattern, $user_agent)) return $os;
}

	return 'Unknown';
}


function get_browser_name($user_agent)
{
$browsers = array(
	'Nintendo Wii' => '(Nintendo Wii)',
	'Opera' => 'Opera',
	'Mozilla Firefox'=> '(Firebird)|(Firefox)',
	'Galeon' => 'Galeon',
	'Mozilla'=>'Gecko',
	'MyIE'=>'MyIE',
	'Lynx' => 'Lynx',
	'Netscape' => '(Mozilla/4\.75)|(Netscape6)|(Mozilla/4\.08)|(Mozilla/4\.5)|(Mozilla/4\.6)|(Mozilla/4\.79)',
	'Konqueror'=>'Konqueror',
	'SearchBot' => '(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp/cat)|(msnbot)|(ia_archiver)',
	'Internet Explorer 7' => '(MSIE 7\.[0-9]+)',
	'Internet Explorer 6' => '(MSIE 6\.[0-9]+)',
	'Internet Explorer 5' => '(MSIE 5\.[0-9]+)',
	'Internet Explorer 4' => '(MSIE 4\.[0-9]+)',
);

foreach($browsers as $browser=>$pattern)
{
	if (eregi($pattern, $user_agent)) return $browser;
}
	return 'Unknown';
}

?>

And yes, it does work on the Wii. :)
http://img262.imageshack.us/img262/1757/dsc086117hq.jpg
Like my IP? Lol @ being on the same network as the server.

You can also add more Browsers/OSes in there too, if you want.
 
G

g1real

Guest
I have no knowledge of such coding, but i can understand < a bit> what it does... <3 having basic knowledge.

Anyhow, a fairly simple script but still effective... but you could just get a link from that website which shows the sign-guy... right?
 

ReVolver

Mega Super Ultra Cool Member
Reaction score
609
Nice! I really wanted to know how to do this :D (Starts to make a design for it)
 
P

Persen

Guest
How entertaining... I just was hacked... :D
Nah, don't call it hacking... makes me a li'l pissed :D
 

mase

____ ___ ____ __
Reaction score
154
Very nice man :p lol

LOL I love that pic :p
 

phyrex1an

Staff Member and irregular helper
Reaction score
447
How entertaining... I just was hacked... :D
Nah, don't call it hacking... makes me a li'l pissed :D

Agrees, it makes people think that your IP, browser and color on underpants is some kind of secret which must be 'hacked'.

<rant>
Truth is
IP: Must be sent, else you wont be able to use teh internets
Browser: Most browser want to tell who they are.
OS: Same as above.

They same thing applies to the page your are requesting ofc :)
I once got a comment "You shouldn't mention what software you are using because it's a security issue". Truth is that I wasn't and admin of that server, I just watched the response headers to find out that info... :banghead:
</rant>
 

Master

Thou shall be helped by...The Black Adder!
Reaction score
72
lol, my hacking sign is scripted.
Good job, DDRtists.
 

DDRtists

ɹoʇɐɹǝpoɯ ɹǝdns
Reaction score
415
How entertaining... I just was hacked... :D
Nah, don't call it hacking... makes me a li'l pissed :D

I know, I called it "Hacking" Sign because thats what the thread where they requested it at was called, and I explained it wasn't hacking. :)
 

Oninuva

You can change this now in User CP.
Reaction score
221
What A Hack.

Anyways... wasn't there some website with this? And you could store this on a database... Collect some nice info here...
 

mase

____ ___ ____ __
Reaction score
154
Lol, wow why would anyone need all the ips ever? What idiots.
 

ReVolver

Mega Super Ultra Cool Member
Reaction score
609
Here is a updated new version I made .. thanks DDRtists

btw don't use imagestring use imagettftext .. its a lot better :cool:

YourIp.php



Here is the source (All credit goes to DDRtists)
PHP:
<?
$os = get_os_name($_SERVER['HTTP_USER_AGENT']);
$ip = GetHostByName($REMOTE_ADDR);
$using = get_browser_name($_SERVER['HTTP_USER_AGENT']);
if($os == 'Unknown') $OSString = 'Hmm, I guess you have a leet OS!';
if($os != 'Unknown') $OSString = 'Your OS is '.$os.'!';
if($using == 'Unknown') $BString = 'Hmm, I guess you have a leet Browser!';
if($using != 'Unknown') $BString = 'Your Browser is '.$using.'!';
$IPString = 'Your IP is '.$ip.'!';
$Hackcomment = 'Preparing to hack your computer......';
$font = 'Verdana';

header("content-type: image/png");
$im=ImageCreateFromPng("hack.png");
$black = imagecolorallocate($im,0,0,0);
$white = imagecolorallocate($im,245,245,255);
imagefill($im,0,0,$white);
imagettftext($im, 8, 0, 5, 140, $black, $font, $OSString);
imagettftext($im, 8, 0, 5, 160, $black, $font, $BString);
imagettftext($im, 8, 0, 5, 180, $black, $font, $IPString);
imagettftext($im, 8, 0, 5, 220, $black, $font, $Hackcomment);
imagepng($im);
imagedestroy($im);    
    
function get_os_name($user_agent)
{

$oses = array (
    'Windows 3.11' => 'Win16',
    'Windows 95' => '(Windows 95)|(Win95)|(Windows_95)',
    'Windows 98' => '(Windows 98)|(Win98)',
    'Windows 2000' => '(Windows NT 5.0)|(Windows 2000)',
    'Windows XP' => '(Windows NT 5.1)|(Windows XP)',
    'Windows 2003' => '(Windows NT 5.2)',
    'Windows NT 4.0' => '(Windows NT 4.0)|(WinNT4.0)|(WinNT)|(Windows NT)',
    'Windows ME' => 'Windows ME',
    'Open BSD'=>'OpenBSD',
    'Sun OS'=>'SunOS',
    'Linux'=>'(Linux)|(X11)',
    'Macintosh'=>'(Mac_PowerPC)|(Macintosh)',
    'QNX'=>'QNX',
    'BeOS'=>'BeOS',
    'OS/2'=>'OS/2',
    'Search Bot'=>'(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp/cat)|(msnbot)|(ia_archiver)'
);

 
foreach($oses as $os=>$pattern)
{
    if (eregi($pattern, $user_agent)) return $os;
}

    return 'Unknown';
}


function get_browser_name($user_agent)
{
$browsers = array(
    'Nintendo Wii' => '(Nintendo Wii)',
    'Opera' => 'Opera',
    'Mozilla Firefox'=> '(Firebird)|(Firefox)',
    'Galeon' => 'Galeon',
    'Mozilla'=>'Gecko',
    'MyIE'=>'MyIE',
    'Lynx' => 'Lynx',
    'Netscape' => '(Mozilla/4\.75)|(Netscape6)|(Mozilla/4\.08)|(Mozilla/4\.5)|(Mozilla/4\.6)|(Mozilla/4\.79)',
    'Konqueror'=>'Konqueror',
    'SearchBot' => '(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp/cat)|(msnbot)|(ia_archiver)',
    'Internet Explorer 7' => '(MSIE 7\.[0-9]+)',
    'Internet Explorer 6' => '(MSIE 6\.[0-9]+)',
    'Internet Explorer 5' => '(MSIE 5\.[0-9]+)',
    'Internet Explorer 4' => '(MSIE 4\.[0-9]+)',
);

foreach($browsers as $browser=>$pattern)
{
    if (eregi($pattern, $user_agent)) return $browser;
}
    return 'Unknown';
}

?>
 

DDRtists

ɹoʇɐɹǝpoɯ ɹǝdns
Reaction score
415
I'm aware of that, but I was too lazy to code in a TTF Font, so I just made a fast Image script to display the concept...
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top