zdgtl 9 months ago
zdgtl #coding

Host Live Checker

import requests
import concurrent.futures
import csv

def check_host(host, login, password):
    url = f'http://{host}/'
    try:
        response = requests.head(url, timeout=2)
        if response.status_code == 200:
            with open('ips.txt', 'a') as result_file:
                result_file.write(f'{host}|{login}|{password}\n')
            print(f'{host} is still live')
    except requests.exceptions.RequestException as e:
        print(f'Error checking {host}: {e}')

with open('data.txt', 'r') as f:
    reader = csv.reader(f, delimiter='|')
    hosts = [(row[0], row[1], '|'.join(row[2:])) for row in reader]

with concurrent.futures.ThreadPoolExecutor(max_workers=10) as executor:
    futures = [executor.submit(check_host, *host) for host in hosts]
    for future in concurrent.futures.as_completed(futures):
        future.result()


0
443

Bulk post Wordpress Via xmlrpc Menggunakan Python

1743468932.jpg
zdgtl
10 months ago
TMDB Movie Scraper

TMDB Movie Scraper

1743468932.jpg
zdgtl
10 months ago
Url Extractor Python Script

Url Extractor Python Script

1743468932.jpg
zdgtl
10 months ago
Cara Merender dan menambahkan logo pake FFmpeg

Cara Merender dan menambahkan logo pake FFmpeg

1743468932.jpg
zdgtl
9 months ago
Logs Cleaner

Logs Cleaner

1743468932.jpg
zdgtl
9 months ago