Bu script Python 2.7.0 ile yazılmışdır. Kodlar aşağıda:
Kod:
from socket import*
import os
def ipfinder():
os.system("cls")
print ""
print " ___ ____ _____ _ _ "
print " |_ _| _ \ | ___(_)_ __ __| | ___ _ __ "
print " | || |_) | | |_ | | '_ \ / _` |/ _ \ '__| "
print " | || __/ | _| | | | | | (_| | __/ | "
print " |___|_| |_| |_|_| |_|\__,_|\___|_| "
print " By dangeryasin61! "
print ""
hedefurl = raw_input("URL/Link ===> ")
hedefip = gethostbyname(hedefurl)
print "================================"
print "Hedef URL ===>",hedefurl
print "Hedef IP ===>",hedefip
print ""
yeniden = raw_input("Yeniden denemek ister misiniz? (E/h) ===> ")
if yeniden == "E" or yeniden == "e":
ipfinder()
else:
return
ipfinder()
Eğer işletim sisteminiz Linux ise, os.system("cls") yerine os.system("clear") yazmanız yeterli olacaktır. İyi forumlar
Giriş
Metin2 özel sunucu geliştirme sürecinde, birçok geliştirici güvenlik, ağ iletişimi ve kullanıcı takibi gibi konularla ilgilenmek zorundadır. Bu bağlamda, bir kullanıcının IP adresini tespit edebilmek veya belirli bir IP'yi bulmak için araçlar geliştirmek önem kazanmaktadır. Python dili, bu tür işlemlerde kolay kullanım, hızlı geliştirme ve güçlü kütüphaneler sunması nedeniyle tercih edilmektedir. Bu makalede, Python kullanarak basit bir IP Finder (IP Bulucu) nasıl yapılır detaylıca ele alınacaktır.
IP Nedir?
IP (Internet Protocol), internet üzerinde veri iletimi için kullanılan temel protokollerden biridir. Her cihazın benzersiz bir IP adresi vardır. Bu adres, cihazın kimliğini ve konumunu belirlemeye yardımcı olur. Özellikle Metin2 gibi oyun sunucularında, IP adresi üzerinden kullanıcı engelleme, yetkilendirme veya saldırı tespiti gibi işlemler yapılabilir.
Python ile IP Adresi Nasıl Alınır?
Python dilinde bir kullanıcının IP adresini almak oldukça kolaydır. Socket modülü sayesinde, istemcinin IP adresini sunucuya bağlandığında alabiliriz. Basit bir örnek ile:
import socket
def get_ip():
hostname = socket.gethostname()
local_ip = socket.gethostbyname(hostname)
return local_ip
print(get_ip())
Bu kod parçası, local IP adresini alır. Ancak bir IP Finder geliştirirken genellikle dış IP adresi (public IP) daha önemlidir. Bunun için harici servislere erişim gerekebilir.
Harici IP Adresi Alma
Aşağıdaki örnekte, httpbin.org gibi bir API kullanarak kullanıcının dış IP adresini alabiliriz:
import requests
def get_public_ip():
response = requests.get('
ip_data = response.json()
return ip_data['origin']
print(get_public_ip())
Bu yöntem, kullanıcının gerçek IP adresini öğrenmek için oldukça etkilidir. Metin2 özel sunucularında, oyuncuların IP adreslerini loglamak veya analiz etmek için bu yapı kullanılabilir.
GUI Kullanarak IP Finder Uygulaması
Python ile görsel arayüz (GUI) tabanlı bir IP Finder oluşturmak da mümkündür. Tkinter kütüphanesi bu konuda idealdir. Aşağıda basit bir GUI IP Finder uygulaması örneği verilmiştir:
import tkinter as tk
from tkinter import messagebox
import requests
def show_ip():
try:
response = requests.get('
ip = response.json()['origin']
messagebox.showinfo('IP Adresiniz', f'Public IP: {ip}')
except Exception as e:
messagebox.showerror('Hata', 'IP alınamadı!')
root = tk.Tk()
root.title('IP Finder')
btn = tk.Button(root, text='IP Adresimi Göster', command=show_ip)
btn.pack(pady=20)
root.mainloop()
Bu GUI, kullanıcı dostu bir arayüz sunar ve Metin2 sunucularında admin panel entegrasyonları için örnek alınabilir.
Not: IP adresleri gizlilik politikalarına tabidir. Geliştiriciler bu bilgiyi yasal sınırlar içinde kullanmalıdır.
Sonuç
Python ile geliştirilen IP Finder uygulamaları, hem basit komut satırı projeleri hem de gelişmiş GUI uygulamaları şeklinde olabilir. Metin2 özel sunucularında, IP tabanlı güvenlik sistemleri, kullanıcı yönetimi ve saldırı tespiti için bu tarz araçlar oldukça faydalıdır. Python’un kolay sözdizimi ve güçlü modüller sayesinde, bu tür sistemler kısa sürede geliştirilebilir ve test edilebilir.
Introduction
During the process of developing Metin2 private servers, many developers need to handle topics such as security, network communication, and user tracking. In this context, detecting a user’s IP address or creating tools to find specific IPs becomes important. The Python language is preferred in such operations due to its ease of use, rapid development capabilities, and powerful libraries. This article will detail how to create a simple IP Finder using Python.
What is an IP?
IP (Internet Protocol) is one of the fundamental protocols used for data transmission over the internet. Every device has a unique IP address. This address helps identify the device and determine its location. Especially in games like Metin2, IP addresses can be used to block users, authorize access, or detect attacks.
How to Get an IP Address in Python?
Obtaining a user's IP address in Python is quite straightforward. With the socket module, you can retrieve the client's IP address upon connection to the server. Here is a simple example:
import socket
def get_ip():
hostname = socket.gethostname()
local_ip = socket.gethostbyname(hostname)
return local_ip
print(get_ip())
This code snippet retrieves the local IP address. However, in IP Finder applications, external IP (public IP) is usually more important. For this purpose, access to external services may be required.
Getting External IP Address
In the example below, we use an API like httpbin.org to retrieve the user's public IP address:
import requests
def get_public_ip():
response = requests.get('
ip_data = response.json()
return ip_data['origin']
print(get_public_ip())
This method is highly effective for retrieving the user's actual IP address. It can be used in Metin2 private servers to log or analyze player IP addresses.
Creating an IP Finder Application with GUI
It is also possible to create a visual (GUI-based) IP Finder application in Python. The Tkinter library is ideal for this purpose. Below is an example of a simple GUI IP Finder application:
import tkinter as tk
from tkinter import messagebox
import requests
def show_ip():
try:
response = requests.get('
ip = response.json()['origin']
messagebox.showinfo('Your IP Address', f'Public IP: {ip}')
except Exception as e:
messagebox.showerror('Error', 'Could not retrieve IP!')
root = tk.Tk()
root.title('IP Finder')
btn = tk.Button(root, text='Show My IP Address', command=show_ip)
btn.pack(pady=20)
root.mainloop()
This GUI provides a user-friendly interface and can serve as a model for admin panel integrations in Metin2 servers.
Note: IP addresses are subject to privacy policies. Developers should use this information within legal boundaries.
Conclusion
IP Finder applications developed in Python can take the form of both simple command-line projects and advanced GUI applications. In Metin2 private servers, such tools are highly beneficial for IP-based security systems, user management, and attack detection. Thanks to Python’s easy syntax and powerful modules, such systems can be developed and tested quickly.
Kod:
from socket import*
import os
def ipfinder():
os.system("cls")
print ""
print " ___ ____ _____ _ _ "
print " |_ _| _ \ | ___(_)_ __ __| | ___ _ __ "
print " | || |_) | | |_ | | '_ \ / _` |/ _ \ '__| "
print " | || __/ | _| | | | | | (_| | __/ | "
print " |___|_| |_| |_|_| |_|\__,_|\___|_| "
print " By dangeryasin61! "
print ""
hedefurl = raw_input("URL/Link ===> ")
hedefip = gethostbyname(hedefurl)
print "================================"
print "Hedef URL ===>",hedefurl
print "Hedef IP ===>",hedefip
print ""
yeniden = raw_input("Yeniden denemek ister misiniz? (E/h) ===> ")
if yeniden == "E" or yeniden == "e":
ipfinder()
else:
return
ipfinder()
Eğer işletim sisteminiz Linux ise, os.system("cls") yerine os.system("clear") yazmanız yeterli olacaktır. İyi forumlar
Python IP Bulucu (IP Finder) Yapımı
Giriş
Metin2 özel sunucu geliştirme sürecinde, birçok geliştirici güvenlik, ağ iletişimi ve kullanıcı takibi gibi konularla ilgilenmek zorundadır. Bu bağlamda, bir kullanıcının IP adresini tespit edebilmek veya belirli bir IP'yi bulmak için araçlar geliştirmek önem kazanmaktadır. Python dili, bu tür işlemlerde kolay kullanım, hızlı geliştirme ve güçlü kütüphaneler sunması nedeniyle tercih edilmektedir. Bu makalede, Python kullanarak basit bir IP Finder (IP Bulucu) nasıl yapılır detaylıca ele alınacaktır.
IP Nedir?
IP (Internet Protocol), internet üzerinde veri iletimi için kullanılan temel protokollerden biridir. Her cihazın benzersiz bir IP adresi vardır. Bu adres, cihazın kimliğini ve konumunu belirlemeye yardımcı olur. Özellikle Metin2 gibi oyun sunucularında, IP adresi üzerinden kullanıcı engelleme, yetkilendirme veya saldırı tespiti gibi işlemler yapılabilir.
Python ile IP Adresi Nasıl Alınır?
Python dilinde bir kullanıcının IP adresini almak oldukça kolaydır. Socket modülü sayesinde, istemcinin IP adresini sunucuya bağlandığında alabiliriz. Basit bir örnek ile:
import socket
def get_ip():
hostname = socket.gethostname()
local_ip = socket.gethostbyname(hostname)
return local_ip
print(get_ip())
Bu kod parçası, local IP adresini alır. Ancak bir IP Finder geliştirirken genellikle dış IP adresi (public IP) daha önemlidir. Bunun için harici servislere erişim gerekebilir.
Harici IP Adresi Alma
Aşağıdaki örnekte, httpbin.org gibi bir API kullanarak kullanıcının dış IP adresini alabiliriz:
import requests
def get_public_ip():
response = requests.get('
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
')ip_data = response.json()
return ip_data['origin']
print(get_public_ip())
Bu yöntem, kullanıcının gerçek IP adresini öğrenmek için oldukça etkilidir. Metin2 özel sunucularında, oyuncuların IP adreslerini loglamak veya analiz etmek için bu yapı kullanılabilir.
GUI Kullanarak IP Finder Uygulaması
Python ile görsel arayüz (GUI) tabanlı bir IP Finder oluşturmak da mümkündür. Tkinter kütüphanesi bu konuda idealdir. Aşağıda basit bir GUI IP Finder uygulaması örneği verilmiştir:
import tkinter as tk
from tkinter import messagebox
import requests
def show_ip():
try:
response = requests.get('
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
')ip = response.json()['origin']
messagebox.showinfo('IP Adresiniz', f'Public IP: {ip}')
except Exception as e:
messagebox.showerror('Hata', 'IP alınamadı!')
root = tk.Tk()
root.title('IP Finder')
btn = tk.Button(root, text='IP Adresimi Göster', command=show_ip)
btn.pack(pady=20)
root.mainloop()
Bu GUI, kullanıcı dostu bir arayüz sunar ve Metin2 sunucularında admin panel entegrasyonları için örnek alınabilir.
Not: IP adresleri gizlilik politikalarına tabidir. Geliştiriciler bu bilgiyi yasal sınırlar içinde kullanmalıdır.
Sonuç
Python ile geliştirilen IP Finder uygulamaları, hem basit komut satırı projeleri hem de gelişmiş GUI uygulamaları şeklinde olabilir. Metin2 özel sunucularında, IP tabanlı güvenlik sistemleri, kullanıcı yönetimi ve saldırı tespiti için bu tarz araçlar oldukça faydalıdır. Python’un kolay sözdizimi ve güçlü modüller sayesinde, bu tür sistemler kısa sürede geliştirilebilir ve test edilebilir.
How to Make a Python IP Finder
Introduction
During the process of developing Metin2 private servers, many developers need to handle topics such as security, network communication, and user tracking. In this context, detecting a user’s IP address or creating tools to find specific IPs becomes important. The Python language is preferred in such operations due to its ease of use, rapid development capabilities, and powerful libraries. This article will detail how to create a simple IP Finder using Python.
What is an IP?
IP (Internet Protocol) is one of the fundamental protocols used for data transmission over the internet. Every device has a unique IP address. This address helps identify the device and determine its location. Especially in games like Metin2, IP addresses can be used to block users, authorize access, or detect attacks.
How to Get an IP Address in Python?
Obtaining a user's IP address in Python is quite straightforward. With the socket module, you can retrieve the client's IP address upon connection to the server. Here is a simple example:
import socket
def get_ip():
hostname = socket.gethostname()
local_ip = socket.gethostbyname(hostname)
return local_ip
print(get_ip())
This code snippet retrieves the local IP address. However, in IP Finder applications, external IP (public IP) is usually more important. For this purpose, access to external services may be required.
Getting External IP Address
In the example below, we use an API like httpbin.org to retrieve the user's public IP address:
import requests
def get_public_ip():
response = requests.get('
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
')ip_data = response.json()
return ip_data['origin']
print(get_public_ip())
This method is highly effective for retrieving the user's actual IP address. It can be used in Metin2 private servers to log or analyze player IP addresses.
Creating an IP Finder Application with GUI
It is also possible to create a visual (GUI-based) IP Finder application in Python. The Tkinter library is ideal for this purpose. Below is an example of a simple GUI IP Finder application:
import tkinter as tk
from tkinter import messagebox
import requests
def show_ip():
try:
response = requests.get('
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
')ip = response.json()['origin']
messagebox.showinfo('Your IP Address', f'Public IP: {ip}')
except Exception as e:
messagebox.showerror('Error', 'Could not retrieve IP!')
root = tk.Tk()
root.title('IP Finder')
btn = tk.Button(root, text='Show My IP Address', command=show_ip)
btn.pack(pady=20)
root.mainloop()
This GUI provides a user-friendly interface and can serve as a model for admin panel integrations in Metin2 servers.
Note: IP addresses are subject to privacy policies. Developers should use this information within legal boundaries.
Conclusion
IP Finder applications developed in Python can take the form of both simple command-line projects and advanced GUI applications. In Metin2 private servers, such tools are highly beneficial for IP-based security systems, user management, and attack detection. Thanks to Python’s easy syntax and powerful modules, such systems can be developed and tested quickly.
