Skip to content

Commit de461ee

Browse files
authored
Merge pull request Z4nzu#78 from 418sec/master
Security Fix for Remote Code Execution - huntr.dev
2 parents 920a238 + 5a322a6 commit de461ee

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

hackingtool.py

+21-14
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# -*- coding: UTF-8 -*-
33
# Version 1.1.0
44
import os
5+
import subprocess
56
import sys
67
import webbrowser
78
import socket
@@ -246,7 +247,7 @@ def dracnmap(self):
246247
def ports(self):
247248
self.clear_scr()
248249
target = input('Select a Target IP: ')
249-
os.system(f"sudo nmap -O -Pn {target}")
250+
subprocess.run(["sudo", "nmap", "-O", "-Pn", f"{target}"])
250251
input('\nPress Enter to back...')
251252
self.info()
252253

@@ -378,7 +379,8 @@ def striker(self):
378379

379380
if choice == "2":
380381
site = input("Enter Site Name (example.com) >> ")
381-
os.system(f"cd Striker && sudo python3 striker.py {site}")
382+
os.system(f"cd Striker")
383+
subprocess.run(["sudo", "python3", "striker.py", f"{site}"])
382384
self.striker()
383385

384386
if choice == "99":
@@ -426,7 +428,7 @@ def portscanner(self):
426428

427429
if choice == "2":
428430
ip = input("Enter Ip >> ")
429-
os.system(f"cd rang3r;sudo python rang3r.py --ip {ip}")
431+
subprocess.run(["sudo", "python", "./rang3r/rang3r.py", "--ip", f"{ip}"])
430432
self.portscanner()
431433

432434
if choice == "99":
@@ -1641,12 +1643,12 @@ def steganohide(self):
16411643
if choice_run == "1":
16421644
file_hide = input("Enter Filename you want to Embed (1.txt) >> ")
16431645
file_to_be_hide = input("Enter Cover Filename(test.jpeg) >> ")
1644-
os.system(f"steghide embed -cf {file_to_be_hide} -ef {file_hide}")
1646+
subprocess.run(["steghide", "embed", "-cf", f"{file_to_be_hide}", "-ef", f"{file_hide}"])
16451647
self.steganohide()
16461648

16471649
if choice_run == "2":
16481650
from_file = input("Enter Filename From Extract Data >> ")
1649-
os.system(f"steghide extract -sf {from_file}")
1651+
subprocess.run(["steghide", "extract", "-sf", f"{from_file}"])
16501652
self.steganohide()
16511653

16521654
if choice_run == '99':
@@ -1669,7 +1671,7 @@ def stegnocracker(self):
16691671
if choice == "2":
16701672
filename = input("Enter Filename:- ")
16711673
passfile = input("Enter Wordlist Filename:- ")
1672-
os.system(f"stegcracker {filename} {passfile}")
1674+
subprocess.run(["stegcracker", f"{filename}", f"{passfile}"])
16731675
self.stegnocracker()
16741676

16751677
if choice == "99":
@@ -1917,7 +1919,8 @@ def instabrute(self):
19171919
if choice == "2":
19181920
name = input("Enter Username >> ")
19191921
wordlist = input("Enter wordword list >> ")
1920-
os.system(f"cd instaBrute;sudo python instaBrute.py -u {name} -d {wordlist}")
1922+
os.system(f"cd instaBrute")
1923+
subprocess.run(["sudo", "python", "instaBrute.py", "-u", f"{name}", "-d", f"{wordlist}"])
19211924
self.instabrute()
19221925

19231926
if choice == "99":
@@ -1957,7 +1960,8 @@ def faceshell(self):
19571960
if choice == "2":
19581961
name = input("Enter Username >> ")
19591962
wordlist = input("Enter Wordlist >> ")
1960-
os.system(f"cd Brute_Force;python3 Brute_Force.py -f {name} -l {wordlist}")
1963+
os.system("cd Brute_Force")
1964+
subprocess.run("python3", "Brute_Force.py", "-f", f"{name}", "-l", f"{wordlist}")
19611965
self.faceshell()
19621966

19631967
if choice == "99":
@@ -2376,7 +2380,8 @@ def sherlock(self):
23762380

23772381
if choice == "2":
23782382
name = input("Enter Username >> ")
2379-
os.system(f"cd sherlock ;sudo python3 sherlock {name}")
2383+
os.system("cd sherlock")
2384+
subprocess.run(["sudo", "python3", "sherlock", f"{name}"])
23802385
self.sherlock()
23812386

23822387
if choice == "99":
@@ -2395,7 +2400,7 @@ def socialscan(self):
23952400

23962401
if choice == "2":
23972402
name = input("Enter Username or Emailid (if both then please space between email & username) >> ")
2398-
os.system(f"sudo socialscan {name}")
2403+
subprocess.run(["sudo", "socialscan", f"{name}"])
23992404
self.socialscan()
24002405

24012406
if choice == "99":
@@ -2570,7 +2575,7 @@ def apk2gold(self):
25702575

25712576
if choice == "2":
25722577
uinput = input("Enter (.apk) File >> ")
2573-
os.system("sudo apk2gold {0}".format(uinput))
2578+
subprocess.run(["sudo", "apk2gold", "{0}".format(uinput)])
25742579

25752580
if choice == "99":
25762581
self.reversetool()
@@ -2629,7 +2634,7 @@ def slowloris(self):
26292634

26302635
if choice == "2":
26312636
target_site = input("Enter Target Site:- ")
2632-
os.system(f"slowloris {target_site}")
2637+
subprocess.run(["slowloris", f"{target_site}"])
26332638
self.slowloris()
26342639

26352640
if choice == "99":
@@ -2651,7 +2656,8 @@ def asyncrone(self):
26512656
source_port = input("Enter Source Port >> ")
26522657
target_ip = input("Enter Target IP >> ")
26532658
target_port = input("Enter Target port >> ")
2654-
os.system(f"cd aSYNcrone;sudo ./aSYNcrone {source_port} {target_ip} {target_port} 1000")
2659+
os.system(f"cd aSYNcrone")
2660+
subprocess.run(["sudo", "./aSYNcrone", f"{source_port}", f"{target_ip}", f"{target_port}", "1000"])
26552661
self.asyncrone()
26562662

26572663
if choice == "99":
@@ -2922,7 +2928,8 @@ def xsscon(self):
29222928

29232929
if choice == "2":
29242930
website = input("Enter Website >> ")
2925-
os.system(f"cd XSSCon;python3 xsscon.py -u {website}")
2931+
os.system("cd XSSCon")
2932+
subprocess.run(["python3", "xsscon.py", "-u", f"{website}"])
29262933
self.xsscon()
29272934

29282935
if choice == "99":

0 commit comments

Comments
 (0)