IRCForumu.Net - Türkiye'nin IRC ve mIRC Kullanıcılarının Buluştuğu Forum

IRCForumu.Net - Türkiye'nin IRC ve mIRC Kullanıcılarının Buluştuğu Forum (https://www.ircforumu.net/)
-   Hazır Kodlar (https://www.ircforumu.net/hazir-kodlar/)
-   -   İp Locator (https://www.ircforumu.net/hazir-kodlar/26-ip-locator.html)

Sessiz 02 Mayıs 2016 22:30

İp Locator
 
Kod, adından da anlaşılacağı üzere sorgulanan IP ile ilgili bilgileri yansıtıyor. Kodu remote bölümüne ekledikten sonra sağ tık yaparak IP Locator seçeneğinden sorgu menüsünü açabilirsiniz. Kodun önceki veri çekmeye çalıştığı siteyi biraz inceledim. Site, 25 sorguya izin veriyordu, sonrasında üyelik istiyordu. Farklı bir siteden güncelledim. (Bazı bölümlerini Türkçeleştirdim.) Html kod filtreleri ile ilgili bir aliasıda htmlfree aliası ile değiştirdim.
Not: Kodda bulunan Bolge: kısmı Türkiye IP'lerinde genellikle Şehiri veriyor(Türkiyede Eyalet sistemi olmadığı için.), yurt dışı IP'lerde ise alttaki örnek resimlerde gözüktüğü gibi Bölge ismini vermektedir. (Kodda hata olduğunu düşünmeyin yani)
Kod, tatlı ve sade bir dialog şeklinde olduğu için hoşuma gitti, kullanmak isteyen olursa şuan çalışan hali aşağıdadır. İyi forumlar.

Proxy IP ile denediğim bir örnek resim1:
https://n1310.hizliresim.com/1g/m/tqcru.jpg

Örnek resim2:
https://s1310.hizliresim.com/1g/m/tqcrx.jpg

Kod:

; IP locator v1.0 - entropy dalnet

;============================== MENUS

menu menubar,status,channel,query {
  -
  IP Locator { locate }
  -
}

;============================== DIALOGS

dialog locate {
  title "IP Locator"
  size -1 -1 134 93
  option dbu notheme
  text "IP Address", 1, 4 4 26 8, right
  edit "", 2, 32 2 62 11
  button "Bul", 3, 96 2 34 11
  text "Durum", 4, 4 16 25 8, right
  edit "", 5, 32 14 62 11, read
  text "Sehir:", 6, 4 34 25 8, right
  text "Bolge:", 7, 4 43 25 8, right
  text "Ulke:", 8, 4 52 25 8, right
  text "ISS:", 9, 4 61 25 8, right
  text "", 10, 32 34 98 8
  text "", 11, 32 43 98 8
  text "", 12, 32 52 98 8
  text "", 13, 32 61 98 8
  button "Clipboard", 14, 62 78 34 11
  button "OK", 15, 96 78 34 11, ok
  box "", 16, -4 25 142 4
  box "", 17, -3 70 142 4
}

;============================== ALIASES

alias -l locate {
  if ($1) {
    did -ra locate 5 Socket Aciliyor...
    did -r locate 10,11,12,13
    sockclose locate
    sockopen locate www.ipaddresslocation.org 80
    sockmark locate $1-
  }
  else {
    dialog $iif($dialog(locate),-x,-m) locate locate
  }
}

alias -l endlocate {
  did -ra locate 5 Islem Tamamlandi.
  if (%ip) { did -ra locate 10 %city | did -ra locate 11 %state | did -ra locate 12 %country | did -ra locate 13 %isp }
  else { did -r locate 10,11,12,13 | did -ra locate 5 Birsey Bulunamadi . }
  unset %isp
  unset %ip
  unset %city
  unset %state
  unset %country
  unset %isp
}
alias htmlfree {
  var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$chr(32),%x), %x = $remove(%x, ) 
  return %x
}
;============================== EVENTS

on *:dialog:locate:sclick:14:{
  var %a = IP: $did(2).text City: $did(10).text State: $did(11).text Country: $did(12).text ISP: $did(13).text
  clipboard %a
}
on *:dialog:locate:sclick:3:{
  if (!$did(2).text) { beep | return }
  locate $did(2).text
}
on *:sockopen:locate:{
  if ($sockerr > 0 && $dialog(locate)) { did -ra locate 5 Socket Acma Hatasi. | did -r locate 10,11,12,13 | return }
  sockwrite -n $sockname GET $+(/ip-address-locator.php?lookup=,$sock($sockname).mark) HTTP/1.1
  sockwrite -n $sockname Host: $+(www.ipaddresslocation.org,$str($crlf, 2))
  sockwrite -n $sockname Connection: close
}
on *:sockread:locate:{
  if ($sockerr > 0 && $dialog(locate)) { did -ra locate 5 Socket Okuma Hatası. | did -r locate 10,11,12,13 | return }
  did -ra locate 5 Veri okunuyor...
  var %q | sockread %q | tokenize 32 $htmlfree(%q)
  if $regex(%q,/.+/A) { $iif(*Country:* iswm $2,set -e %country $3-) $iif(*Region:* iswm $2,set -e %state $3-) $iif(*City:* iswm $2,set -e %city $3-) $iif(*Provider:* iswm $2,set -e %isp $3-) }
  set -e %ip $sock($sockname).mark
  .timertrace 1 1 endlocate
}



Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 13:01.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0
Copyright ©2005 - 2023 IRCForumu.Net - Tüm Hakları Saklıdır.