mirror of
https://github.com/Z4nzu/hackingtool
synced 2026-05-23 00:49:59 +00:00
Phase 13: Python 3 modernization and os.system cleanup
- Replace os.system("cd X; ...") no-op cd subshells with subprocess.run(cwd=...)
in: xss_attack.py (XSSCon, XanXSS), payload_creator.py (TheFatRat update/troubleshoot),
forensics.py (BulkExtractor gui/cli), phishing_attack.py (BlackPhish update)
- Replace os.system echo+boxes+lolcat in post_exploitation.py with console.print
- Fix socialmedia_finder.py: print()+os.system+lolcat → subprocess+console.print
- Fix forensics.py cli_mode: os.system apt/bulk_extractor → subprocess.run list form
This commit is contained in:
parent
daf253d255
commit
d1bcca5675
6 changed files with 43 additions and 27 deletions
|
|
@ -43,21 +43,26 @@ class BulkExtractor(HackingTool):
|
|||
], installable=False, runnable=False)
|
||||
|
||||
def gui_mode(self):
|
||||
import subprocess
|
||||
from config import get_tools_dir
|
||||
console.print(Panel(Text(self.TITLE, justify="center"), style="bold magenta"))
|
||||
console.print("[bold magenta]Cloning repository and attempting to run GUI...[/]")
|
||||
os.system("git clone https://github.com/simsong/bulk_extractor.git")
|
||||
os.system("ls src/ && cd .. && cd java_gui && ./BEViewer")
|
||||
tools_dir = get_tools_dir()
|
||||
subprocess.run(["git", "clone", "https://github.com/simsong/bulk_extractor.git"],
|
||||
cwd=str(tools_dir))
|
||||
be_dir = tools_dir / "bulk_extractor"
|
||||
subprocess.run(["./BEViewer"], cwd=str(be_dir / "java_gui"))
|
||||
console.print(
|
||||
"[magenta]If you get an error after clone go to /java_gui/src/ and compile the .jar file && run ./BEViewer[/]")
|
||||
console.print(
|
||||
"[magenta]Please visit for more details about installation: https://github.com/simsong/bulk_extractor[/]")
|
||||
|
||||
def cli_mode(self):
|
||||
import subprocess
|
||||
console.print(Panel(Text(self.TITLE + " - CLI Mode", justify="center"), style="bold magenta"))
|
||||
os.system("sudo apt install bulk-extractor")
|
||||
console.print("[magenta]Showing bulk_extractor help and options:[/]")
|
||||
os.system("bulk_extractor -h")
|
||||
os.system('echo "bulk_extractor [options] imagefile" | boxes -d headline | lolcat')
|
||||
subprocess.run(["sudo", "apt", "install", "-y", "bulk-extractor"])
|
||||
console.print("[magenta]bulk_extractor [options] imagefile[/]")
|
||||
subprocess.run(["bulk_extractor", "-h"])
|
||||
|
||||
|
||||
class Guymager(HackingTool):
|
||||
|
|
|
|||
|
|
@ -28,14 +28,14 @@ class FacialFind(HackingTool):
|
|||
PROJECT_URL = "https://github.com/Greenwolf/social_mapper"
|
||||
|
||||
def run(self):
|
||||
os.system("cd social_mapper/setup")
|
||||
os.system("sudo python social_mapper.py -h")
|
||||
print("""\033[95m
|
||||
You have to set Username and password of your AC Or Any Fack Account
|
||||
[#] Type in Terminal nano social_mapper.py
|
||||
""")
|
||||
os.system(
|
||||
'echo "python social_mapper.py -f [<imageFoldername>] -i [<imgFolderPath>] -m fast [<AcName>] -fb -tw"| boxes | lolcat')
|
||||
from config import get_tools_dir
|
||||
import subprocess
|
||||
setup_dir = get_tools_dir() / "social_mapper" / "setup"
|
||||
subprocess.run(["python3", "social_mapper.py", "-h"], cwd=str(setup_dir))
|
||||
console.print(
|
||||
"[bold magenta]Set username and password in social_mapper.py before running.[/]\n"
|
||||
"[magenta]Usage: python social_mapper.py -f <folder> -i <path> -m fast <AcName> -fb -tw[/]"
|
||||
)
|
||||
|
||||
|
||||
class FindUser(HackingTool):
|
||||
|
|
|
|||
|
|
@ -23,10 +23,17 @@ class TheFatRat(HackingTool):
|
|||
])
|
||||
|
||||
def update(self):
|
||||
os.system("cd TheFatRat && bash update && chmod +x setup.sh && bash setup.sh")
|
||||
from config import get_tools_dir
|
||||
cwd = str(get_tools_dir() / "TheFatRat")
|
||||
subprocess.run(["bash", "update"], cwd=cwd)
|
||||
subprocess.run(["chmod", "+x", "setup.sh"], cwd=cwd)
|
||||
subprocess.run(["bash", "setup.sh"], cwd=cwd)
|
||||
|
||||
def troubleshoot(self):
|
||||
os.system("cd TheFatRat && sudo chmod +x chk_tools && ./chk_tools")
|
||||
from config import get_tools_dir
|
||||
cwd = str(get_tools_dir() / "TheFatRat")
|
||||
subprocess.run(["chmod", "+x", "chk_tools"], cwd=cwd)
|
||||
subprocess.run(["./chk_tools"], cwd=cwd)
|
||||
|
||||
|
||||
class Brutal(HackingTool):
|
||||
|
|
|
|||
|
|
@ -199,7 +199,9 @@ class BlackPhish(HackingTool):
|
|||
super().__init__([("Update", self.update)])
|
||||
|
||||
def update(self):
|
||||
os.system("cd BlackPhish && sudo bash update.sh")
|
||||
import subprocess
|
||||
from config import get_tools_dir
|
||||
subprocess.run(["bash", "update.sh"], cwd=str(get_tools_dir() / "BlackPhish"))
|
||||
|
||||
|
||||
class Dnstwist(HackingTool):
|
||||
|
|
|
|||
|
|
@ -20,10 +20,12 @@ class Vegile(HackingTool):
|
|||
PROJECT_URL = "https://github.com/Screetsec/Vegile"
|
||||
|
||||
def before_run(self):
|
||||
os.system('echo "You can Use Command: \n'
|
||||
'[!] Vegile -i / --inject [backdoor/rootkit] \n'
|
||||
'[!] Vegile -u / --unlimited [backdoor/rootkit] \n'
|
||||
'[!] Vegile -h / --help"|boxes -d parchment')
|
||||
console.print(
|
||||
"[bold magenta]Vegile commands:[/]\n"
|
||||
" Vegile -i / --inject [backdoor/rootkit]\n"
|
||||
" Vegile -u / --unlimited [backdoor/rootkit]\n"
|
||||
" Vegile -h / --help"
|
||||
)
|
||||
|
||||
|
||||
class ChromeKeyLogger(HackingTool):
|
||||
|
|
|
|||
|
|
@ -91,8 +91,9 @@ class XSSCon(HackingTool):
|
|||
border_style="bright_yellow"
|
||||
))
|
||||
website = Prompt.ask("[bold cyan]Enter Website[/bold cyan]")
|
||||
os.system("cd XSSCon;")
|
||||
subprocess.run(["python3", "xsscon.py", "-u", website])
|
||||
from config import get_tools_dir
|
||||
subprocess.run(["python3", "xsscon.py", "-u", website],
|
||||
cwd=str(get_tools_dir() / "XSSCon"))
|
||||
|
||||
|
||||
class XanXSS(HackingTool):
|
||||
|
|
@ -102,10 +103,9 @@ class XanXSS(HackingTool):
|
|||
PROJECT_URL = "https://github.com/Ekultek/XanXSS"
|
||||
|
||||
def run(self):
|
||||
os.system("cd XanXSS; python xanxss.py -h")
|
||||
console.print(
|
||||
"[cyan]You have to run it manually using:[/cyan]\n[bold yellow]python xanxss.py [options][/bold yellow]"
|
||||
)
|
||||
from config import get_tools_dir
|
||||
subprocess.run(["python3", "xanxss.py", "-h"],
|
||||
cwd=str(get_tools_dir() / "XanXSS"))
|
||||
|
||||
|
||||
class XSSStrike(HackingTool):
|
||||
|
|
|
|||
Loading…
Reference in a new issue