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
#!/bin/bash | |
# Normally windows doesn't give out the process name when you run netstat -ano, thus making it | |
# hard to figure out what process is bound to the different ports. This script extracts the PID | |
# from the netstat output, and fetches the corresponding binary name from the tasklist, and | |
# merges the two together. Needs a MinGW environment like Git Bash and python to work. | |
{ tasklist | tail -n +5; echo ===; netstat -ano | grep LIST; } | python -c " | |
import sys | |
pad = [0, 21, 9, 0, 5, 8, 0] |
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
def log(): | |
print("Establishing connection...") | |
conn = Connection(3, timeout=5) | |
print('Logging output...') | |
while True: | |
print('Listening for output...') | |
try: | |
resp = conn.receive() | |
except struct.error: | |
print("Timed out") |
NewerOlder