Advertisement
OrFeAsGr

ipinfoNEW

Dec 10th, 2017
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.81 KB | None | 0 0
  1. ON *:TEXT:*:#: {
  2. if ($1 == !ipinfo) {
  3. if (!$2) { .notice $nick Please specify a valid IP/Hostname | return }
  4. set %ipinfo $2
  5. sockopen ipinfo v2.api.iphub.info 80
  6. }
  7. }
  8.  
  9. ON *:SOCKOPEN:ipinfo: {
  10. if ($sockerr) { echo -at Error While Looking Up IP | sockclose $sockname }
  11. sockwrite -nt $sockname GET $+(/ip/,%ipinfo) HTTP/1.1
  12. sockwrite -nt $sockname User-Agent: Mozilla/4.0
  13. sockwrite -nt $sockname Host: v2.api.iphub.info
  14. sockwrite -nt $sockname X-Key: MTExMzpSa2dJMTN4bWVYNldKZlRkOEhva0paRzdRM0c5b1J6Rw==
  15. sockwrite $sockname $crlf
  16. }
  17.  
  18. ON *:SOCKREAD:ipinfo: {
  19. var %ipr
  20. sockread %ipr
  21. tokenize 58 %ipr
  22. if ($noqt($1) == block) {
  23. set %ipmsg $addtok(%ipmsg,Security: $ipblock($2),32)
  24. msg %ipchan %ipmsg
  25. unset %ipmsg %ipchan
  26. sockclose $sockname
  27. }
  28. set %ipmsg $addtok(%ipmsg,$remove($noqt($1-),$chr(44)),32)
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement