Welcome to the forum 👋, Guest

To access the forum content and all our services, you must register or log in to the forum. Becoming a member of the forum is completely free.

  • PËRSHËNDETJE VIZITOR!

    Nëse ju shfaqet ky mesazh do të thotë se ju nuk jeni regjistruar akoma. Anëtarët e rregjistruar kanë privilegjin të marrin pjesë në tema të ndryshme si dhe të komunikojnë me anëtarët e tjerë. Bëhu pjesë e forumit Netedy.com duke u REGJISTRUAR këtu ose nëse ke një llogari KYCU. Komunikim alternative i ketij forumi me vajza dhe djem nga te gjithe trevat shqiptare? Hyr ne: CHAT SHQIP.

[TCL] BlackBird Public IP Information v2

centos

ⓃⒺⓉⒺⒹⓎ.ⒸⓄⓂ
ANETAR ✓
Regjistruar më
Dhj 13, 2004
Mesazhe
39,935
Code:
# Autori: x0r / molecule
# IRC: Netedy.com
# Data: 18/05/2019
# Mund ta merrni dhe ta modifikoni sipas shijeve tuaja.

# Aktivizimi behet me komanden: .+chanset #opers +reporter
setudef flag reporter

# Kanali ku do raportoje te dhenat per cdo IP.
set blackbird(report) "#opers"
# Emri Scriptit
set blackbird(name) "BlackBird Public ip information powered by x0r"
# Versioni Scriptit
set blackbird(version) "2.0.1"
# URL i database ku do lexojme te dhenat.
set blackbird(ipinfo) "http://ip-api.com/"

# Nevojitet moduli i http qe instalohet bashke me tcl-dev
package require http
# Nevojitet moduli i json qe instalohet bashke me tcl-dev
package require json
  
# Komanda shembull: !ip 127.0.0.1
bind pub -|- !ip blackbird:ip
  
proc blackbird:ip {nick uhost hand chan arg} {
global blackbird
if {![channel get $chan reporter]} { return }

if {![regexp {^(?:(?:[01]?\d?\d|2[0-4]\d|25[0-5])(\.|$)){4}$} $arg]} { putserv "PRIVMSG $blackbird(report) :$nick IP e pasakte. Shembull/Perdorimi: !ip 127.0.0.1"; return }


if {[catch {http::geturl $blackbird(ipinfo)json/$arg} tok]} {
        putlog "Socket error: $tok"
        return 0
    }
    if {[http::status $tok] ne "ok"} {
        set status [http::status $tok]
      
        putlog "TCP error: $status"
        return 0
    }
    if {[http::ncode $tok] != 200} {
        set code [http::code $tok]
        http::cleanup $tok

        putlog "HTTP Error: $code"
        return 0
    }

    set data [http::data $tok]
    set parse [::json::json2dict $data]
    set country [dict get $parse country]
    set region [dict get $parse regionName]
    set city [dict get $parse city]
    set timezone [dict get $parse timezone]
    set isp [dict get $parse isp]
    set org [dict get $parse org]
    set as [dict get $parse as]
  
    set systemTime [clock seconds]
  
  
    putserv "PRIVMSG $blackbird(report) IP: \00312$arg\003 =>\003 Country:\00306 $country\003 | \003Region: \00306$region\003 | \003City: \00306$city\003 | \003ISP: \00306$isp\003 | \003ORG: \00306$org\003 | \003AS: \00306$as\00305 (INFO: [clock format $systemTime -format %H:%M:%S])"

}

putlog "TCL: $blackbird(name) - v: $blackbird(version) Loaded."
 
Eshte script per eggdrop qe te nxjerr informacionet publike te IP-ve.
Eggdrop eshte BlackBird tek dhoma opers, dhe kte scriptin e teston live aty shembull: !i 24.55.62.125
Sh flm si gjithmon sh I sjellshem !
 

Postime të reja

Theme customization system

You can customize some areas of the forum theme from this menu.

Choose the color combination according to your taste

Select Day/Night mode

You can use it by choosing the day and night modes that suit your style or needs.

Welcome to the forum 👋, Guest

To access the forum content and all our services, you must register or log in to the forum. Becoming a member of the forum is completely free.