make more stuff win32 specific
This commit is contained in:
parent
ca3e489adb
commit
8b005d0ece
15
main.py
15
main.py
@ -13,10 +13,12 @@ settings = None
|
|||||||
netdata_res = None
|
netdata_res = None
|
||||||
procdata_res = None
|
procdata_res = None
|
||||||
|
|
||||||
sysid = hex(uuid.getnode())
|
# Get unique system values
|
||||||
res = subprocess.check_output(["WMIC", "ComputerSystem", "GET", "UserName"], universal_newlines=True)
|
if platform == "win32":
|
||||||
_, username = res.strip().rsplit("\n", 1)
|
sysid = hex(uuid.getnode())
|
||||||
userid, sysdom = username.rsplit("\\", 1)
|
res = subprocess.check_output(["WMIC", "ComputerSystem", "GET", "UserName"], universal_newlines=True)
|
||||||
|
_, username = res.strip().rsplit("\n", 1)
|
||||||
|
userid, sysdom = username.rsplit("\\", 1)
|
||||||
|
|
||||||
def run_ps(cmd):
|
def run_ps(cmd):
|
||||||
if platform == "win32":
|
if platform == "win32":
|
||||||
@ -25,6 +27,7 @@ def run_ps(cmd):
|
|||||||
|
|
||||||
def netstat():
|
def netstat():
|
||||||
print("netstat started")
|
print("netstat started")
|
||||||
|
if platform == "win32":
|
||||||
data = run_ps("netstat -n -o -b")
|
data = run_ps("netstat -n -o -b")
|
||||||
return data
|
return data
|
||||||
|
|
||||||
@ -108,9 +111,7 @@ if __name__ == '__main__':
|
|||||||
freeze_support() # required if packaged into EXE
|
freeze_support() # required if packaged into EXE
|
||||||
# create manager to share data to me, background, foreground
|
# create manager to share data to me, background, foreground
|
||||||
# create worker pool
|
# create worker pool
|
||||||
#global sysid
|
|
||||||
#sysdom, userid
|
|
||||||
print(sysid, sysdom, userid)
|
|
||||||
with Pool(processes=5) as pool:
|
with Pool(processes=5) as pool:
|
||||||
with Manager() as manager:
|
with Manager() as manager:
|
||||||
displaydata = manager.list(range(2)) # data to be printed
|
displaydata = manager.list(range(2)) # data to be printed
|
||||||
|
27
out.csv
27
out.csv
@ -1,8 +1,7 @@
|
|||||||
0xf44ee3942e7d,FRAMEWORKWIN,Cole,1663646899
|
0xf44ee3942e7d,FRAMEWORKWIN,Cole,1663647380
|
||||||
firefox.exe,TCP,[2620:f3:8000:5060:5939:a4c0:4f5b:113f]:53338,[2607:f518:5::4816:b9c7]:80,ESTABLISHED,8008
|
firefox.exe,TCP,[2620:f3:8000:5060:5939:a4c0:4f5b:113f]:53387,[2607:f8b0:4009:81c::200a]:443,ESTABLISHED,8008
|
||||||
firefox.exe,TCP,[2620:f3:8000:5060:5939:a4c0:4f5b:113f]:53301,[2607:f8b0:4009:817::200e]:443,ESTABLISHED,8008
|
firefox.exe,TCP,[2620:f3:8000:5060:5939:a4c0:4f5b:113f]:53386,[2607:f8b0:4009:81c::200a]:443,ESTABLISHED,8008
|
||||||
firefox.exe,TCP,[2620:f3:8000:5060:5939:a4c0:4f5b:113f]:53292,[2607:f8b0:4009:808::2003]:80,TIME_WAIT,0
|
firefox.exe,TCP,[2620:f3:8000:5060:5939:a4c0:4f5b:113f]:53377,[2606:4700:3035::ac43:ca7b]:443,TIME_WAIT,0
|
||||||
firefox.exe,TCP,[2620:f3:8000:5060:5939:a4c0:4f5b:113f]:53285,[2606:4700:4400::6812:2962]:443,TIME_WAIT,0
|
|
||||||
python.exe,TCP,127.0.0.1:51987,127.0.0.1:51986,ESTABLISHED,17244
|
python.exe,TCP,127.0.0.1:51987,127.0.0.1:51986,ESTABLISHED,17244
|
||||||
python.exe,TCP,127.0.0.1:51986,127.0.0.1:51987,ESTABLISHED,17244
|
python.exe,TCP,127.0.0.1:51986,127.0.0.1:51987,ESTABLISHED,17244
|
||||||
VSCodium.exe,TCP,127.0.0.1:51978,127.0.0.1:51977,ESTABLISHED,17828
|
VSCodium.exe,TCP,127.0.0.1:51978,127.0.0.1:51977,ESTABLISHED,17828
|
||||||
@ -55,23 +54,13 @@ nxserver.bin,TCP,127.0.0.1:6363,127.0.0.1:49761,ESTABLISHED,8116
|
|||||||
mDNSResponder.exe,TCP,127.0.0.1:5354,127.0.0.1:49674,ESTABLISHED,4076
|
mDNSResponder.exe,TCP,127.0.0.1:5354,127.0.0.1:49674,ESTABLISHED,4076
|
||||||
mDNSResponder.exe,TCP,127.0.0.1:5354,127.0.0.1:49670,ESTABLISHED,4076
|
mDNSResponder.exe,TCP,127.0.0.1:5354,127.0.0.1:49670,ESTABLISHED,4076
|
||||||
nxserver.bin,TCP,127.0.0.1:4742,127.0.0.1:50778,ESTABLISHED,8116
|
nxserver.bin,TCP,127.0.0.1:4742,127.0.0.1:50778,ESTABLISHED,8116
|
||||||
nxserver.bin,TCP,104.194.122.206:53343,208.59.79.12:443,TIME_WAIT,0
|
firefox.exe,TCP,104.194.122.206:53385,104.192.142.9:443,ESTABLISHED,8008
|
||||||
nxserver.bin,TCP,104.194.122.206:53340,54.212.237.219:443,TIME_WAIT,0
|
firefox.exe,TCP,104.194.122.206:53384,142.250.190.78:443,ESTABLISHED,8008
|
||||||
firefox.exe,TCP,104.194.122.206:53339,54.212.237.219:443,ESTABLISHED,8008
|
firefox.exe,TCP,104.194.122.206:53383,54.201.164.58:443,ESTABLISHED,8008
|
||||||
firefox.exe,TCP,104.194.122.206:53337,54.212.237.219:443,ESTABLISHED,8008
|
firefox.exe,TCP,104.194.122.206:53382,35.186.227.140:443,ESTABLISHED,8008
|
||||||
firefox.exe,TCP,104.194.122.206:53335,208.59.79.12:443,TIME_WAIT,0
|
|
||||||
firefox.exe,TCP,104.194.122.206:53334,208.59.79.12:443,ESTABLISHED,8008
|
|
||||||
VSCodium.exe,TCP,104.194.122.206:53314,76.76.21.61:443,ESTABLISHED,3816
|
VSCodium.exe,TCP,104.194.122.206:53314,76.76.21.61:443,ESTABLISHED,3816
|
||||||
VSCodium.exe,TCP,104.194.122.206:53313,76.76.21.164:443,ESTABLISHED,3816
|
VSCodium.exe,TCP,104.194.122.206:53313,76.76.21.164:443,ESTABLISHED,3816
|
||||||
VSCodium.exe,TCP,104.194.122.206:53312,76.76.21.164:443,CLOSE_WAIT,3816
|
|
||||||
firefox.exe,TCP,104.194.122.206:53307,104.192.142.9:443,ESTABLISHED,8008
|
|
||||||
firefox.exe,TCP,104.194.122.206:53300,54.201.164.58:443,TIME_WAIT,0
|
|
||||||
firefox.exe,TCP,104.194.122.206:53299,35.186.227.140:443,ESTABLISHED,8008
|
|
||||||
firefox.exe,TCP,104.194.122.206:53298,162.159.130.232:443,TIME_WAIT,0
|
|
||||||
firefox.exe,TCP,104.194.122.206:53297,162.159.128.232:443,TIME_WAIT,0
|
|
||||||
firefox.exe,TCP,104.194.122.206:53290,162.159.138.232:443,TIME_WAIT,0
|
|
||||||
firefox.exe,TCP,104.194.122.206:53289,162.159.135.234:443,ESTABLISHED,8008
|
firefox.exe,TCP,104.194.122.206:53289,162.159.135.234:443,ESTABLISHED,8008
|
||||||
firefox.exe,TCP,104.194.122.206:53284,72.21.91.29:80,TIME_WAIT,0
|
|
||||||
firefox.exe,TCP,104.194.122.206:53160,142.250.191.106:443,ESTABLISHED,8008
|
firefox.exe,TCP,104.194.122.206:53160,142.250.191.106:443,ESTABLISHED,8008
|
||||||
firefox.exe,TCP,104.194.122.206:53154,142.250.191.106:443,ESTABLISHED,8008
|
firefox.exe,TCP,104.194.122.206:53154,142.250.191.106:443,ESTABLISHED,8008
|
||||||
firefox.exe,TCP,104.194.122.206:52525,104.192.142.11:443,ESTABLISHED,8008
|
firefox.exe,TCP,104.194.122.206:52525,104.192.142.11:443,ESTABLISHED,8008
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user