Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
Changed python syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisTruncer committed Apr 23, 2020
1 parent 8ba9268 commit 887cbe9
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[2020-04-22]
Released.: 3.1.14
Modified.: Fix for #351, it was just superficial and never stopped the tool from running, but changes "is not" to !=

[2020-03-25]
Released.: 3.1.13
Modified.: Imports now use new version of imports, and updated setup script (both were pull requests)
Expand Down
2 changes: 1 addition & 1 deletion lib/common/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
sys.exit()

# Current version of Veil
veil_version = "3.1.13"
veil_version = "3.1.14"


def title_screen():
Expand Down
2 changes: 1 addition & 1 deletion tools/evasion/evasion_common/outfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def compiler(payload_object, invoked=False, cli_object=None):
# Used when outputting exe files, go figure
executable_filepath = settings.PAYLOAD_COMPILED_PATH + file_name + ".exe"

if payload_object.language is not "native" and payload_object.extension is not "war":
if payload_object.language != "native" and payload_object.extension != "war":
with open(source_code_filepath, 'w') as source_file:
source_file.write(payload_object.payload_source_code)

Expand Down
4 changes: 2 additions & 2 deletions tools/evasion/evasion_common/shellcode_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def menu(self):
if selection != '':
num_extra_options = selection.split(' ')
for xtra_opt in num_extra_options:
if xtra_opt is not '':
if xtra_opt != '':
if "=" not in xtra_opt:
print(helpers.color(" [!] Parameter not entered in correct syntax.\n", warning=True))
continue
Expand Down Expand Up @@ -547,7 +547,7 @@ def cli_msf_shellcode_gen(command_line_args):
if command_line_args.msfoptions is not None:
num_extra_options = command_line_args.msfoptions.split(' ')
for xtra_opt in num_extra_options:
if xtra_opt is not '':
if xtra_opt != '':
if "=" not in xtra_opt:
print(helpers.color(" [!] Parameter not entered in correct syntax.\n", warning=True))
sys.exit()
Expand Down
6 changes: 3 additions & 3 deletions tools/evasion/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def cli_menu(self, invoked=False):
# -c
if self.command_options.c is not None:
for payload_option in self.command_options.c:
if payload_option is not '':
if payload_option != '':
if "=" not in payload_option:
print(helpers.color(" [!] Payload option not entered in correct syntax.\n", warning=True))
sys.exit()
Expand Down Expand Up @@ -415,15 +415,15 @@ def use_payload(self, selected_payload):
key = key.upper()
if key in selected_payload.required_options:
# Validate LHOST value
if key is "LHOST":
if key == "LHOST":
if helpers.validate_ip(value):
selected_payload.required_options[key][0] = value
else:
print()
print(helpers.color(" [!] ERROR: You did not provide a valid IP!", warning=True))
print()
# Validate LPORT
elif key is "LPORT":
elif key == "LPORT":
if helpers.validate_port(value):
selected_payload.required_options[key][0] = value
else:
Expand Down
4 changes: 2 additions & 2 deletions tools/ordnance/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def cli_menu(self, invoked=False):
payload.cli_gen_shellcode()
self.final_shellcode = payload.customized_shellcode
# Check if an encoder is being called by the user
if self.command_options.encoder is not None:
if self.command_options.encoder != None:
encoder_found_here = False
if "BadChars" in payload.required_options:
payload.required_options["BadChars"][0] = self.command_options.bad_chars
Expand Down Expand Up @@ -376,7 +376,7 @@ def use_payload(self, payload):
self.payload_options['RHOST'] = rhost_out

# Check if encoder is needed
if payload.required_options["Encoder"][0] is not "None":
if payload.required_options["Encoder"][0] != "None":
self.use_encoder(payload)
self.final_shellcode = payload.customized_shellcode

Expand Down

0 comments on commit 887cbe9

Please sign in to comment.