Skip to content

Commit 570fae1

Browse files
committed
Added Java Dependency Check
1 parent b7451e5 commit 570fae1

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

PyDuck.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
def main():
2828
"Initialize system, search for modules and encoder"
2929
init(autoreset=True) # Colorama init
30+
javaCheck()
3031
output.cls()
3132
output.banner()
3233
loadModules()
@@ -35,6 +36,7 @@ def main():
3536
def main_quick():
3637
"Fast payload generation using command line arguments"
3738
init(autoreset=True)
39+
javaCheck()
3840
output.cls()
3941
output.banner()
4042
loadModules()
@@ -80,6 +82,13 @@ def main_quick():
8082
else:
8183
output.error("Module '" + modulename + "' does not exist")
8284

85+
def javaCheck():
86+
ret = os.system("java -version")
87+
if ret > 0:
88+
output.error("Java not installed or Java not in PATH Variable")
89+
sys.exit(1)
90+
91+
8392
def loadModules():
8493
output.info("Loading Modules...")
8594
global modules

output.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ def banner():
2222
print(" /____/\n")
2323
print(" \x1B[3mby ThoughtfulDev | github.com/ThoughtfulDev\x1B[23m\n")
2424
print(" \x1B[3mGet your USB Rubber Ducky up and running faster\x1B[23m")
25-
print(Fore.WHITE + " \t\t Version " + Fore.MAGENTA + "1.2.0\n")
25+
print(Fore.WHITE + " \t\t Version " + Fore.MAGENTA + "1.2.1\n")

0 commit comments

Comments
 (0)