Advertisement
omanwebhosting

IP LOOKUP SCRIPT

Aug 18th, 2019
1,548
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.26 KB | None | 0 0
  1. ;;;IP LOOKUP by Researcher;;;;;;;;;;;
  2. ;;;v1.8 ;;;
  3. ;;;The Script is working again! ;;;
  4. ;;;All same features except DNSBL check;;;
  5. ;;; Reduced lines a lot! The script is now smaller, faster, and more practical ;;;
  6. ;;; 10/02/2018 ;;;
  7. ;;; Thx for the support, if you find any bugs let me know :);;;
  8. ;;; Donating is helpful: zeeshan@consultant.com ;;;
  9. on *:sockopen:iplook: {
  10. if ($sockerr) { echo -at Error While Looking Up IP }
  11. sockwrite -nt $sockname GET %iplook HTTP/1.1
  12. sockwrite -nt $sockname User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.246
  13. sockwrite -nt $sockname Host: $ipinfohost
  14. sockwrite $sockname $crlf
  15. }
  16.  
  17. on *:sockread:iplook: {
  18. if ($sockerr) { echo -at Error While Looking Up IP }
  19. var %read | sockread %read
  20. ;echo -at %read
  21. if (*table* iswm %read) { inc %ipin.table 1 }
  22. if (%ipin.table == 1) || (%ipin.table == 3) {
  23. if (*table* !iswm %read) {
  24. var %read = $remove($replace(%read,</th><td>,$chr(32)),<tr><th>,</td></tr>)
  25. tokenize 58 %read
  26. var %item = $+($replace($1,$chr(32),chr32),:)
  27. var %value = $iif(%item == Country:, $gettok($2,1,60), $iif($istok(Type: Assignment:,%item,32),$gettok($gettok($2,2,62),1,60),$2))
  28. if (!$istok(Latitude: Longitude: Blacklist:,%item,32)) && ($istok(IP: Decimal: Hostname: ISP: Organization: Services: Type: Assignment: Continent: Country: State/Region: City: Postalchr32Code:,%item,32)) { set %ipin.all $addtok(%ipin.all,%item %value,32) | set $+(%,ipin.,%item) %value }
  29. if ($istok(Latitude: Longitude:,%item,32)) { set %grabnext %item }
  30. if (%grabnext) && (%item != %grabnext) { set $+(%,ipin.,%grabnext) $gettok(%read,1,38) | unset %grabnext }
  31. if (%ipin.longitude:) && (!%ipin.map) { set %ipin.map 1 | set %ipin.all $addtok(%ipin.all,Location: $+(http://maps.google.com/maps?q=loc:,%ipin.latitude:,$chr(44),%ipin.longitude:,&z=7),32) }
  32. }
  33. }
  34. if (%ipin.table == 2) { $iif(%mon = !, msg, notice) %ipchan %ipin.all | unset %ipin.all }
  35. if (%ipin.table == 4) { $iif(%mon = !, msg, notice) %ipchan $replace(%ipin.all,chr32,$chr(32)) | sockclose $sockname | unset %ipin.* }
  36. }
  37. alias iplookup { set %ipchan $2 | set %iplook $+(/ip/,$1) | $iif(%mon == !, msg, notice) $2 Looking Up IP: $1 | sockopen -e iplook $ipinfohost 443 }
  38.  
  39. on *:TEXT:*:*: {
  40. if ($mid($1,2) == ipinfo) && ($istok(! @,$left($1,1),32)) {
  41. inc %ipusageadv 1
  42. if (%ipusageadv == 200) { .timet 1 20 msg $chan IP Look Up By OrFeAsGr mirc-land.tk --- orpheusgr.tk (Art) }
  43. set %mon $left($1,1)
  44. if ($remove($strip($2),.) isnum) {
  45. iplookup $strip($2) $iif($left($1,1) == !, $iif($chan, $v1, $nick), $iif($left($1,1) == @, $nick, $chan))
  46. }
  47. if ($remove($strip($2),.) !isnum) {
  48. set %ipchan $iif($left($1,1) == !, $iif($chan, $v1, $nick), $iif($left($1,1) == @, $nick, $chan))
  49. .dns -h $strip($2)
  50. }
  51. }
  52. }
  53.  
  54. on *:DNS: {
  55. if (%ipchan) {
  56. if ($raddress) {
  57. iplookup $raddress %ipchan
  58. }
  59. elseif (!$raddress) {
  60. msg %ipchan 3Error14: 7Hostname Could Not Be Resolved14.
  61. }
  62. }
  63. }
  64.  
  65. alias ipinfohost { return $decode(d2hhdGlzbXlpcGFkZHJlc3MuY29t, m) }
  66. ;;;IP LOOKUP by Researcher;;;;;;;;;;;
  67. ;;; Design and Developed for - Researcher IRC Bot ;;;;;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement