Skip to content

Commit 4262cd9

Browse files
authored
Minor fixes
Minor fixes regarding usage of `subprocess.run` in order to make it work correctly
1 parent 6e41f4a commit 4262cd9

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

hackingtool.py

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def dracnmap(self):
247247
def ports(self):
248248
self.clear_scr()
249249
target = input('Select a Target IP: ')
250-
subprocess.run(["sudo nmap", f" -O -Pn {target}"])
250+
subprocess.run(["sudo", "nmap", "-O", "-Pn", f"{target}"])
251251
input('\nPress Enter to back...')
252252
self.info()
253253

@@ -380,7 +380,7 @@ def striker(self):
380380
if choice == "2":
381381
site = input("Enter Site Name (example.com) >> ")
382382
os.system(f"cd Striker")
383-
subprocess.run(["sudo python3 striker.py", f"{site}"])
383+
subprocess.run(["sudo", "python3", "striker.py", f"{site}"])
384384
self.striker()
385385

386386
if choice == "99":
@@ -428,8 +428,7 @@ def portscanner(self):
428428

429429
if choice == "2":
430430
ip = input("Enter Ip >> ")
431-
os.system(f"cd rang3r")
432-
subprocess.run(["sudo python rang3r.py", f"--ip {ip}"])
431+
subprocess.run(["sudo", "python", "./rang3r/rang3r.py", "--ip", f"{ip}"])
433432
self.portscanner()
434433

435434
if choice == "99":
@@ -1644,12 +1643,12 @@ def steganohide(self):
16441643
if choice_run == "1":
16451644
file_hide = input("Enter Filename you want to Embed (1.txt) >> ")
16461645
file_to_be_hide = input("Enter Cover Filename(test.jpeg) >> ")
1647-
subprocess.run(["steghide", "embed", f"-cf {file_to_be_hide}", f"-ef {file_hide}"])
1646+
subprocess.run(["steghide", "embed", "-cf", f"{file_to_be_hide}", "-ef", f"{file_hide}"])
16481647
self.steganohide()
16491648

16501649
if choice_run == "2":
16511650
from_file = input("Enter Filename From Extract Data >> ")
1652-
subprocess.run([f"steghide extract", f" -sf {from_file}"])
1651+
subprocess.run(["steghide", "extract", "-sf", f"{from_file}"])
16531652
self.steganohide()
16541653

16551654
if choice_run == '99':
@@ -1672,7 +1671,7 @@ def stegnocracker(self):
16721671
if choice == "2":
16731672
filename = input("Enter Filename:- ")
16741673
passfile = input("Enter Wordlist Filename:- ")
1675-
subprocess.run(["stegcracker", f" {filename} {passfile}"])
1674+
subprocess.run(["stegcracker", f"{filename}", f"{passfile}"])
16761675
self.stegnocracker()
16771676

16781677
if choice == "99":
@@ -1921,7 +1920,7 @@ def instabrute(self):
19211920
name = input("Enter Username >> ")
19221921
wordlist = input("Enter wordword list >> ")
19231922
os.system(f"cd instaBrute")
1924-
subprocess.run(["sudo python instaBrute.py", f" -u {name} -d {wordlist}"])
1923+
subprocess.run(["sudo", "python", "instaBrute.py", "-u", f"{name}", "-d", f"{wordlist}"])
19251924
self.instabrute()
19261925

19271926
if choice == "99":
@@ -1962,7 +1961,7 @@ def faceshell(self):
19621961
name = input("Enter Username >> ")
19631962
wordlist = input("Enter Wordlist >> ")
19641963
os.system("cd Brute_Force")
1965-
subprocess.run("python3 Brute_Force.py", f" -f {name} -l {wordlist}")
1964+
subprocess.run("python3", "Brute_Force.py", "-f", f"{name}", "-l", f"{wordlist}")
19661965
self.faceshell()
19671966

19681967
if choice == "99":
@@ -2382,7 +2381,7 @@ def sherlock(self):
23822381
if choice == "2":
23832382
name = input("Enter Username >> ")
23842383
os.system("cd sherlock")
2385-
subprocess.run(["sudo python3 sherlock", f" {name}"])
2384+
subprocess.run(["sudo", "python3", "sherlock", f"{name}"])
23862385
self.sherlock()
23872386

23882387
if choice == "99":
@@ -2401,7 +2400,7 @@ def socialscan(self):
24012400

24022401
if choice == "2":
24032402
name = input("Enter Username or Emailid (if both then please space between email & username) >> ")
2404-
subprocess.run(["sudo socialscan", f" {name}"])
2403+
subprocess.run(["sudo", "socialscan", f"{name}"])
24052404
self.socialscan()
24062405

24072406
if choice == "99":
@@ -2576,7 +2575,7 @@ def apk2gold(self):
25762575

25772576
if choice == "2":
25782577
uinput = input("Enter (.apk) File >> ")
2579-
subprocess.run(["sudo apk2gold", " {0}".format(uinput)])
2578+
subprocess.run(["sudo", "apk2gold", "{0}".format(uinput)])
25802579

25812580
if choice == "99":
25822581
self.reversetool()
@@ -2635,7 +2634,7 @@ def slowloris(self):
26352634

26362635
if choice == "2":
26372636
target_site = input("Enter Target Site:- ")
2638-
subprocess.run(["slowloris", f" {target_site}"])
2637+
subprocess.run(["slowloris", f"{target_site}"])
26392638
self.slowloris()
26402639

26412640
if choice == "99":
@@ -2658,7 +2657,7 @@ def asyncrone(self):
26582657
target_ip = input("Enter Target IP >> ")
26592658
target_port = input("Enter Target port >> ")
26602659
os.system(f"cd aSYNcrone")
2661-
subprocess.run(["sudo ./aSYNcrone", f" {source_port} {target_ip} {target_port} 1000"])
2660+
subprocess.run(["sudo", "./aSYNcrone", f"{source_port}", f"{target_ip}", f"{target_port}", "1000"])
26622661
self.asyncrone()
26632662

26642663
if choice == "99":
@@ -2930,7 +2929,7 @@ def xsscon(self):
29302929
if choice == "2":
29312930
website = input("Enter Website >> ")
29322931
os.system("cd XSSCon")
2933-
subprocess.run(["python3 xsscon.py", f" -u {website}"])
2932+
subprocess.run(["python3", "xsscon.py", "-u", f"{website}"])
29342933
self.xsscon()
29352934

29362935
if choice == "99":

0 commit comments

Comments
 (0)