Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[PHP] IP2Base10

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Mon Aug 27, 2007 9:57 am    Post subject: [PHP] IP2Base10 Reply with quote

I wrote a program in C a while back which converted hostnames / IP addresses into a base10 number. (You can paste base10 IP's into a browser and it redirects you to the website. Handy for filters in schools).

For example: http://3639556963

Anyway, if anyone ever needs it this is how its done, lol.

Code:
<?php
 
 $ip = gethostbyname($_POST["host"]);
 $Newip = explode(".", $ip);
 $tv = array( 16777216, 65536, 256 );
 
 for($i = 0; $i < 3; $i++)
 {
    $result[$i] = $Newip[$i] * $tv[$i];
 }
 $base10 = $result[0] + $result[1] + $result[2] + $Newip[3]; // Newip[3] stays as it is
 
 print("<font color='#00FF00'><b><center>Base 10 Result: $base10 </b></font></center>");
 
?>



You need a form to send the hostname to the php script:

Code:
<form name="form1" method="post" action="base10.php">
  <div align="center"><strong>Hostname:</strong>
    <input type="text" name="host">
  </div>
 
  <div align="center">
      <input type="submit" name="Submit" value="Submit">
  </div>
</form>


change action="base10.php" to point to your php file.

I only made this because i've been messing around with PHP so dont take the piss!

NOTE: Base10 IP's only work on Internet Explorer (I think)


Last edited by Noz3001 on Fri Sep 14, 2007 8:04 am; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
nog_lorp
Grandmaster Cheater
Reputation: 0

Joined: 26 Feb 2006
Posts: 743

PostPosted: Mon Aug 27, 2007 11:05 am    Post subject: Reply with quote

Noap, your link to google worked on FireFox 2.0.0.6
_________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish
Back to top
View user's profile Send private message
zart
Master Cheater
Reputation: 0

Joined: 20 Aug 2007
Posts: 351
Location: russia

PostPosted: Mon Aug 27, 2007 11:31 am    Post subject: Reply with quote

When people make malicious links they often use this... Another random thing to note is that you can add random test before the base10 and it does nothing (acts as if it is logging in)

http://notamaliciouslink@3639556963/


Edit: It can be dependant on the users browser though - some will tell you that you are attempting to log in - while others just ignore it.

_________________
0x7A 0x61 0x72 0x74

TEAM RESURRECTiON
Back to top
View user's profile Send private message
nog_lorp
Grandmaster Cheater
Reputation: 0

Joined: 26 Feb 2006
Posts: 743

PostPosted: Mon Aug 27, 2007 11:59 am    Post subject: Reply with quote

http://www.bankofamerica.com@3639556963/
_________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Mon Aug 27, 2007 12:45 pm    Post subject: Reply with quote

Lol, i never knew that XD
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites