Python - IP adresi ile konum tespiti

DisserF

Üye
21 Ağu 2016
203
83
Dünya
Selam ben DisserF. Kendimce pythonda bir şeyler yazıyorum, buda bir tanesi. Öğrendiğiniz IP adreslerini bu kod sayesinde Google maps üzerinden konumunu tespit edebilirsiniz.

Python:
import geocoder
import folium
import requests

def get_location(ip):
    response = requests.get(f'https://ipapi.co/{ip}/json/').json()

    if "city" in response and "region" in response and "country_name" in response:
        location_data = {
            "Ip Adres": ip,
            "Şehir": response.get("city"),
            "Bölge": response.get("region"),
            "Ülke": response.get("country_name")
        }
        return location_data
    else:
        return "Konum verisi bulunamadı."

if __name__ == "__main__":
    user = input("IP adres girin: ")
    location = get_location(user)
    print(location)

    g = geocoder.ip(user)
    latlng = g.latlng

    if latlng is not None:
        user_map = folium.Map(location=latlng, zoom_start=12)
        folium.Marker(location=latlng, popup=f"IP Adres: {user}").add_to(user_map)
        user_map.save("D:\codes/aynen kanka/my_map.html")
        print("Harita oluşturuldu: my_map.html")
    else:
        print("Konum bilgisi bulunamadı.")

"user_map.save("D:\codes/aynen kanka/my_map.html")" bu kodu kendi dosyanızın bulunduğu yer ile değiştirin ve çalıştırın. Bulduğunuz IP adreslerini girin ve dosyanın içerisine oluşturulan html uzantısını açıp konumu öğrenin. İyi forumlar.
 

Ertugrul'

Basın&Medya Ekibi Deneyimli
22 Mar 2023
1,175
923
Photoshop 🔥
Selam ben DisserF. Kendimce pythonda bir şeyler yazıyorum, buda bir tanesi. Öğrendiğiniz IP adreslerini bu kod sayesinde Google maps üzerinden konumunu tespit edebilirsiniz.

Python:
import geocoder
import folium
import requests

def get_location(ip):
    response = requests.get(f'https://ipapi.co/{ip}/json/').json()

    if "city" in response and "region" in response and "country_name" in response:
        location_data = {
            "Ip Adres": ip,
            "Şehir": response.get("city"),
            "Bölge": response.get("region"),
            "Ülke": response.get("country_name")
        }
        return location_data
    else:
        return "Konum verisi bulunamadı."

if __name__ == "__main__":
    user = input("IP adres girin: ")
    location = get_location(user)
    print(location)

    g = geocoder.ip(user)
    latlng = g.latlng

    if latlng is not None:
        user_map = folium.Map(location=latlng, zoom_start=12)
        folium.Marker(location=latlng, popup=f"IP Adres: {user}").add_to(user_map)
        user_map.save("D:\codes/aynen kanka/my_map.html")
        print("Harita oluşturuldu: my_map.html")
    else:
        print("Konum bilgisi bulunamadı.")

"user_map.save("D:\codes/aynen kanka/my_map.html")" bu kodu kendi dosyanızın bulunduğu yer ile değiştirin ve çalıştırın. Bulduğunuz IP adreslerini girin ve dosyanın içerisine oluşturulan html uzantısını açıp konumu öğrenin. İyi forumlar.
Eline sağlık deniyeceğim.
 

gostking

Katılımcı Üye
29 Nis 2020
364
689
Vatan
Selam ben DisserF. Kendimce pythonda bir şeyler yazıyorum, buda bir tanesi. Öğrendiğiniz IP adreslerini bu kod sayesinde Google maps üzerinden konumunu tespit edebilirsiniz.

Python:
import geocoder
import folium
import requests

def get_location(ip):
    response = requests.get(f'https://ipapi.co/{ip}/json/').json()

    if "city" in response and "region" in response and "country_name" in response:
        location_data = {
            "Ip Adres": ip,
            "Şehir": response.get("city"),
            "Bölge": response.get("region"),
            "Ülke": response.get("country_name")
        }
        return location_data
    else:
        return "Konum verisi bulunamadı."

if __name__ == "__main__":
    user = input("IP adres girin: ")
    location = get_location(user)
    print(location)

    g = geocoder.ip(user)
    latlng = g.latlng

    if latlng is not None:
        user_map = folium.Map(location=latlng, zoom_start=12)
        folium.Marker(location=latlng, popup=f"IP Adres: {user}").add_to(user_map)
        user_map.save("D:\codes/aynen kanka/my_map.html")
        print("Harita oluşturuldu: my_map.html")
    else:
        print("Konum bilgisi bulunamadı.")

"user_map.save("D:\codes/aynen kanka/my_map.html")" bu kodu kendi dosyanızın bulunduğu yer ile değiştirin ve çalıştırın. Bulduğunuz IP adreslerini girin ve dosyanın içerisine oluşturulan html uzantısını açıp konumu öğrenin. İyi forumlar.
Eline emeğine sağlık güzel konu
 

rootXReluX

Üye
4 Tem 2023
135
64
sqlmap,xss,wpscan
Selam ben DisserF. Kendimce pythonda bir şeyler yazıyorum, buda bir tanesi. Öğrendiğiniz IP adreslerini bu kod sayesinde Google maps üzerinden konumunu tespit edebilirsiniz.

Python:
import geocoder
import folium
import requests

def get_location(ip):
    response = requests.get(f'https://ipapi.co/{ip}/json/').json()

    if "city" in response and "region" in response and "country_name" in response:
        location_data = {
            "Ip Adres": ip,
            "Şehir": response.get("city"),
            "Bölge": response.get("region"),
            "Ülke": response.get("country_name")
        }
        return location_data
    else:
        return "Konum verisi bulunamadı."

if __name__ == "__main__":
    user = input("IP adres girin: ")
    location = get_location(user)
    print(location)

    g = geocoder.ip(user)
    latlng = g.latlng

    if latlng is not None:
        user_map = folium.Map(location=latlng, zoom_start=12)
        folium.Marker(location=latlng, popup=f"IP Adres: {user}").add_to(user_map)
        user_map.save("D:\codes/aynen kanka/my_map.html")
        print("Harita oluşturuldu: my_map.html")
    else:
        print("Konum bilgisi bulunamadı.")

"user_map.save("D:\codes/aynen kanka/my_map.html")" bu kodu kendi dosyanızın bulunduğu yer ile değiştirin ve çalıştırın. Bulduğunuz IP adreslerini girin ve dosyanın içerisine oluşturulan html uzantısını açıp konumu öğrenin. İyi forumlar.
Kendi dosyanız derken bu kodun dosya yolu ilemi dostum?
 

Nemesa

Katılımcı Üye
15 Şub 2023
285
133
System32.exe/nemesaxploit
Selam ben DisserF. Kendimce pythonda bir şeyler yazıyorum, buda bir tanesi. Öğrendiğiniz IP adreslerini bu kod sayesinde Google maps üzerinden konumunu tespit edebilirsiniz.

Python:
import geocoder
import folium
import requests

def get_location(ip):
    response = requests.get(f'https://ipapi.co/{ip}/json/').json()

    if "city" in response and "region" in response and "country_name" in response:
        location_data = {
            "Ip Adres": ip,
            "Şehir": response.get("city"),
            "Bölge": response.get("region"),
            "Ülke": response.get("country_name")
        }
        return location_data
    else:
        return "Konum verisi bulunamadı."

if __name__ == "__main__":
    user = input("IP adres girin: ")
    location = get_location(user)
    print(location)

    g = geocoder.ip(user)
    latlng = g.latlng

    if latlng is not None:
        user_map = folium.Map(location=latlng, zoom_start=12)
        folium.Marker(location=latlng, popup=f"IP Adres: {user}").add_to(user_map)
        user_map.save("D:\codes/aynen kanka/my_map.html")
        print("Harita oluşturuldu: my_map.html")
    else:
        print("Konum bilgisi bulunamadı.")

"user_map.save("D:\codes/aynen kanka/my_map.html")" bu kodu kendi dosyanızın bulunduğu yer ile değiştirin ve çalıştırın. Bulduğunuz IP adreslerini girin ve dosyanın içerisine oluşturulan html uzantısını açıp konumu öğrenin. İyi forumlar.
Ellerine sağlık hep sitelerden bakıyordum artık kendim yapacam
 
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.