wsa01378 在 ip列表txt显示国家名字的神秘代码 中发帖
[1734433331231]
python脚本配合扫扫用
import requests
import re
import pycountry # Install with: pip install pycountry
from urllib.parse import urlparse
import socket
IPINFO_TOKEN = "*****改成你的ipinfo.io TOKEN*****" # Replace with your actual token
IP_ADDRESSES_FILE = "ip_addresses.txt"
OUTPUT_FILE = "ip_addresses_with_country.txt"
def get_country(ip_address):
try:
response = requests.get...