This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import bencodepy | |
import humanize | |
import argparse | |
def total_size_files_torrent(file_name): | |
try: | |
parsed = bencodepy.decode_from_file(file_name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
# How to use : Launch next to a file named MachineList.txt with one address per line | |
# Out comes Results.csv with the address and either "Up" or "Down" on each line | |
# Original line order is preserved | |
# Pings ~1700 hosts in 30 seconds on my laptop | |
async def ping(adresse, indice, tableau): | |
proc = await asyncio.create_subprocess_shell('ping -n 1 ' + adresse + " | find \"TTL\"", | |
stdout=asyncio.subprocess.PIPE) |