Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias ipl {
- if (!$1) { echo -a 10 You must enter the IP address to find, in this format 12 $+ /ip 111.111.111.111 | return }
- if ($remove($1,.) !isnum) { echo -a Error: Your IP address is not correct, try again! | return }
- var %s = InfoIP_ $+ $ticks $+ _ $+ $rand(1,10000000)
- if ($sock(%s)) { sockclose %s }
- echo -a ***** Searching information for IP: $+ $1 $+ *****
- sockopen %s geoip.flagfox.net 80
- sockmark %s $1
- }
- ON *:SOCKOPEN:InfoIP_*: {
- if ($sockerr) { echo -a ERROR: Connection problem, Could not connect to the page! | sockclose $sockname | return }
- sockwrite -nt $sockname GET /?ip= $+ $sock($sockname).mark HTTP/1.1
- sockwrite -nt $sockname Host: $sock($sockname).addr
- sockwrite -nt $sockname Connection: close
- sockwrite -nt $sockname $crlf
- }
- ON *:SOCKREAD:InfoIP_*: {
- if ($sockerr) { echo -a ERROR: Connection reading problem, Could not read from the page! | sockclose $sockname | return }
- var %r
- sockread %r
- var %r = $remove(%r,$chr(9),$chr(10),$chr(13))
- ; echo -a READ: %r
- if ($sockbr == 0) { return }
- if (*span class="font"><a href="http://whois.domaintools.com/* iswm %r) { echo -a 12Hostname:1 $httpstrip(%r) $+ }
- if (*<a href="http://en.wikipedia.org/wiki/* iswm %r) && ($left(%r,2) == <a) && (*target="_blank" title="Wikipedia entry for* iswm %r) { echo -a 12Continent:1 $httpstrip(%r) $+ }
- if (*<span style="white-space: nowrap"><a href="http://en.wikipedia.org/wiki/* iswm %r) && (*target="_blank" title="* iswm %r) { echo -a 12Country:1 $httpstrip(%r) $+ }
- if (*<span class="dim">* isin %r) { echo -a 12City:1 $httpstrip(%r) $+ }
- if (*<span class="smallfont">* iswm %r) && ($numtok(%r,60) == 1) { echo -a 12ISP:1 $httpstrip(%r) $+ }
- if (*['_setCustomVar', 2, 'Country Code',* iswm %r) { echo -a 12Country Code:1 $remove($gettok(%r,4,44),') }
- }
- ON *:SOCKCLOSE:InfoIP_*: { echo -a ***** End of $+ $sock($sockname).mark $+ IP lookup! ***** }
- alias httpstrip {
- var %xx = $replace($1-,&,$chr(38),$chr(124),-,$chr(125),-,},-,|,-,",$chr(34),&,&,<,<,>,>, ,$chr(32),&#039;,$chr(39),$chr(13),$chr(32))
- var %x = $remove(%xx,<![CDATA[,]]>,$chr(2),$chr(4),$chr(9),$chr(31),$chr(22),$chr(29),$chr(10),$chr(13))
- var %i = $regsub(%x,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x)
- return %x
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement