Skip to content

0.2.6 #22

Merged
merged 2 commits into from
Dec 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 52 additions & 14 deletions src/leap.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def privesc_1():
os.system("ipconfig/all") #runs the command


def privesc_2():
def privesc_2(ops):
print("priv-esc-2 by: Webb")

if ops == "Windows":
Expand All @@ -115,8 +115,30 @@ def privesc_3():
print("priv-esc-3 by:")


def file_output(output):
# get file name from user
print("Enter file name:")
filename = input()

# get file path from user
print("\nEnter file path:")
print("(If left blank the file will be stored in the current directory)")
filepath = input()

# if no path given, use current directory
if filepath == "":
filepath = os.getcwd()

# write enum result to file
file = open(f"{filepath}\{filename}", "a")
file.write(f"{output}\n")

# close file
file.close


def menu(sys):
quit = False
finish = False

# display windows menu
if sys == "Windows":
Expand Down Expand Up @@ -165,45 +187,53 @@ def menu(sys):
if (start == 2) or (start == 4) or (start == 7) or (start == 9):
start = 13

# go to function chosen by user
# go to function chosen by user, print returned value
if start == 1:
print(enum_1())
result = enum_1()
print(result)
input()

elif start == 2:
print(enum_2())
result = enum_2()
print(result)
input()

elif start == 3:
print(enum_3())
result = enum_3()
print(result)
input()

elif start == 4:
print(enum_4())
result = enum_4()
print(result)
input()

elif start == 5:
print(enum_5())
result = enum_5()
print(result)
input()

elif start == 6:
print(enum_6())
result = enum_6()
print(result)
input()

elif start == 7:
print(enum_7())
result = enum_7()
print(result)
input()

elif start == 8:
print(enum_8())
result = enum_8()
print(result)
input()

elif start == 9:
print(privesc_1())
input()

elif start == 10:
print(privesc_2())
print(privesc_2(sys))
input()

elif start == 11:
Expand All @@ -212,14 +242,22 @@ def menu(sys):

elif start == 12:
# if user wants to quit
quit = True
finish = True

else:
print("Invalid Input")
input()

# if enumeration selected, offer to print result to a file
if start in range(1, 8, 1):
print("Would you like to print to a file? Y/N")

# if user says yes, print to file
if input().upper() == "Y":
file_output(result)

# return whether user wants to quit
return quit
return finish


# continue to display menu
Expand Down