for port in range(1, 1025): if scan_port("192.168.1.1", port): print(f"Port port open") from pynput import keyboard def on_press(key): with open("log.txt", "a") as f: f.write(str(key))
Christopher Laird Simmons has been a working journalist since his first magazine sale in 1984. He has since written for wide variety of print and online publications covering lifestyle, tech and entertainment. He is an award-winning author, designer, photographer, and musician. He is a member of ASCAP and PRSA. He is the founder and CEO of Neotrope®, based in Temecula, CA, USA.
for port in range(1, 1025): if scan_port("192.168.1.1", port): print(f"Port port open") from pynput import keyboard def on_press(key): with open("log.txt", "a") as f: f.write(str(key)) Python Hacking