Atlas - qsend
Home / usr / qsend Lines: 1 | Size: 757 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)][FILE BEGIN]1#!/usr/bin/env python3 2 3import http.server 4import socketserver 5import sys 6import subprocess 7 8def get_ip_addresses(): 9 ip_addresses = [] 10 local_ip = subprocess.check_output("hostname -I", shell=True).decode().strip() 11 ip_addresses.extend(local_ip.split(" ")) 12 return ip_addresses 13 14if __name__ == "__main__": 15 if len(sys.argv) != 2: 16 print("Usage: python -m qsend <file>") 17 sys.exit(1) 18 19 file_to_send = sys.argv[1] 20 ip_addresses = get_ip_addresses() 21 22 for ip in ip_addresses: 23 print(f"curl -O http://{ip}:8000/{file_to_send}") 24 25 handler = http.server.SimpleHTTPRequestHandler 26 with socketserver.TCPServer(("", 8000), handler) as httpd: 27 print("Serving at port 8000") 28 httpd.serve_forever() 29[FILE END](C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.