Coderja 11 hours ago
Coderja #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()


Unix Timestamp Converter

Unix Timestamp Converter

defaultuser.png
Coderja
3 weeks ago
Menghapus string sebelum dan sesudah patern menggunakan regex di notepa++

Menghapus string sebelum dan sesudah patern menggunakan regex di notep...

defaultuser.png
Coderja
6 days ago
Text Line Replacer

Text Line Replacer

defaultuser.png
Coderja
2 weeks ago
Url Extractor Python Script

Url Extractor Python Script

defaultuser.png
Coderja
3 weeks ago
How to move the post title below content wordpress

How to move the post title below content wordpress

defaultuser.png
Coderja
1 week ago