-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathFull_Information.py
More file actions
68 lines (53 loc) · 1.76 KB
/
Full_Information.py
File metadata and controls
68 lines (53 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import time
import random
import subprocess
from datetime import datetime
import os
# full_information from Target PC
# 8/13/2025
# AUX-441
class information:
def information_(self):
list_of_cmmnds = [
"dir",
"tasklist",
"net user",
"netstat /a",
"ipconfig/all",
"systeminfo",
"arp -a",
"route print",
"driverquery",
"sc query state= all",
"net share",
"schtasks /query /fo LIST /v",
"wmic cpu get name,numberofcores,currentclockspeed",
"wmic os get caption,version,osarchitecture,serialnumber",
"qwinsta"
]
time.sleep(random.randint(1,3))
output_all = ""
for i in list_of_cmmnds:
try:
print(f"Running command: {i}")
run = subprocess.run(i,shell=True)
output_all += f"\n\nCommand: {i}\nOutput:\n{run.stdout}\n\n{'-' * 50}\n\n"
print(f"Succesfully Executed all commands : {run.stdout}")
except Exception as e:
print(f"Failed to execute commands : {e}")
try:
folder = "full_informations"
if os.path.exists(folder):
print("Folder already exist ....")
else:
os.makedirs(folder)
path = "information.txt"
full = os.path.join("full_informations",path)
with open(full,"w",encoding="utf-8") as w:
w.write(output_all)
print(f"Succesfully Write all content to :{full}")
except FileNotFoundError as f:
print(f"Failed to Found Path : {f}")
if __name__ == "__main__":
C = information()
C.information_()