Fix beacon command to support setbeacon set-beacon and beacon again

chunking
m0rv4i 2019-02-13 09:29:20 +00:00
parent 543ebc3c15
commit c75016e506
1 changed files with 6 additions and 8 deletions

View File

@ -438,8 +438,8 @@ def runcommand(command, randomuri):
if 'beacon' in command.lower() or 'set-beacon' in command.lower() or 'setbeacon' in command.lower():
new_sleep = command.replace('set-beacon ', '')
new_sleep = command.replace('setbeacon ', '')
new_sleep = command.replace('beacon ', '')
new_sleep = new_sleep.replace('setbeacon ', '')
new_sleep = new_sleep.replace('beacon ', '')
if not validate_sleep_time(new_sleep):
print(Colours.RED)
print("Invalid sleep command, please specify a time such as 50s, 10m or 1h")
@ -720,8 +720,8 @@ def runcommand(command, randomuri):
elif ('beacon' in command.lower() and '-beacon' not in command.lower()) or 'set-beacon' in command.lower() or 'setbeacon' in command.lower():
new_sleep = command.replace('set-beacon ', '')
new_sleep = command.replace('setbeacon ', '')
new_sleep = command.replace('beacon ', '')
new_sleep = new_sleep.replace('setbeacon ', '')
new_sleep = new_sleep.replace('beacon ', '')
if not validate_sleep_time(new_sleep):
print(Colours.RED)
print("Invalid sleep command, please specify a time such as 50s, 10m or 1h")
@ -730,8 +730,6 @@ def runcommand(command, randomuri):
new_task(command, user, randomuri)
update_sleep(new_sleep, randomuri)
elif (command.lower().startswith('label-implant')):
label = command.replace('label-implant ', '')
update_label(label, randomuri)
@ -771,8 +769,8 @@ def runcommand(command, randomuri):
if ('beacon' in command.lower() and '-beacon' not in command.lower()) or 'set-beacon' in command.lower() or 'setbeacon' in command.lower():
new_sleep = command.replace('set-beacon ', '')
new_sleep = command.replace('setbeacon ', '')
new_sleep = command.replace('beacon ', '')
new_sleep = new_sleep.replace('setbeacon ', '')
new_sleep = new_sleep.replace('beacon ', '')
if not validate_sleep_time(new_sleep):
print(Colours.RED)
print("Invalid sleep command, please specify a time such as 50s, 10m or 1h")