Skip to content
Permalink
fce200cac0
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 59 lines (47 sloc) 1.7 KB
#!/usr/bin/env python3
from js_plugins import DumbSudoEscalation
if __name__=="__main__":
#Make a list of available privescs
pes=[]
pes.append(DumbSudoEscalation("swordfish"))
#And enumerations
ens=[]
shouldQuit=False
while not shouldQuit:
print("=".join("-"*10))
print(" Logo here...")
print("LEAP Menu")
print("\nPrivescs:")
for i in range(len(pes)):
print(f"\tP{i}: {pes[i].name}")
print("\nEnumerations:")
for i in range(len(ens)):
print(f"\tE{i}: {ens[i].name}")
print("\nQ to quit")
print()
userInput=input("Enter a selection: ")
print("-"*20)
#remove whitespace, make uppercase
userInput=userInput.strip().upper()
if userInput == "Q":
shouldQuit=True
elif (userInput[0] in ["P","E"] and #Privesc or enumeration
len(userInput)>1): #Make sure it's more than 1 letter
useList=ens
if userInput[0]=="P":
useList=pes
index=userInput[1:] #Get the number part...
for i in index:
if not i.isdigit():
print("Invalid selection:",userInput)
break
else:
index=int(index) #Make it a number
if index<len(useList):
chosen=useList[index]
print(chosen.info())
yesno=input("Enter YES in capitals to execute...")
if yesno.strip()=="YES":
chosen.execute()
else:
print("Unknown command")