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

Commit 887cbe9

Browse files
committed
Changed python syntax
1 parent 8ba9268 commit 887cbe9

File tree

6 files changed

+13
-9
lines changed

6 files changed

+13
-9
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[2020-04-22]
2+
Released.: 3.1.14
3+
Modified.: Fix for #351, it was just superficial and never stopped the tool from running, but changes "is not" to !=
4+
15
[2020-03-25]
26
Released.: 3.1.13
37
Modified.: Imports now use new version of imports, and updated setup script (both were pull requests)

lib/common/messages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
sys.exit()
1616

1717
# Current version of Veil
18-
veil_version = "3.1.13"
18+
veil_version = "3.1.14"
1919

2020

2121
def title_screen():

tools/evasion/evasion_common/outfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def compiler(payload_object, invoked=False, cli_object=None):
4949
# Used when outputting exe files, go figure
5050
executable_filepath = settings.PAYLOAD_COMPILED_PATH + file_name + ".exe"
5151

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

tools/evasion/evasion_common/shellcode_help.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ def menu(self):
457457
if selection != '':
458458
num_extra_options = selection.split(' ')
459459
for xtra_opt in num_extra_options:
460-
if xtra_opt is not '':
460+
if xtra_opt != '':
461461
if "=" not in xtra_opt:
462462
print(helpers.color(" [!] Parameter not entered in correct syntax.\n", warning=True))
463463
continue
@@ -547,7 +547,7 @@ def cli_msf_shellcode_gen(command_line_args):
547547
if command_line_args.msfoptions is not None:
548548
num_extra_options = command_line_args.msfoptions.split(' ')
549549
for xtra_opt in num_extra_options:
550-
if xtra_opt is not '':
550+
if xtra_opt != '':
551551
if "=" not in xtra_opt:
552552
print(helpers.color(" [!] Parameter not entered in correct syntax.\n", warning=True))
553553
sys.exit()

tools/evasion/tool.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def cli_menu(self, invoked=False):
191191
# -c
192192
if self.command_options.c is not None:
193193
for payload_option in self.command_options.c:
194-
if payload_option is not '':
194+
if payload_option != '':
195195
if "=" not in payload_option:
196196
print(helpers.color(" [!] Payload option not entered in correct syntax.\n", warning=True))
197197
sys.exit()
@@ -415,15 +415,15 @@ def use_payload(self, selected_payload):
415415
key = key.upper()
416416
if key in selected_payload.required_options:
417417
# Validate LHOST value
418-
if key is "LHOST":
418+
if key == "LHOST":
419419
if helpers.validate_ip(value):
420420
selected_payload.required_options[key][0] = value
421421
else:
422422
print()
423423
print(helpers.color(" [!] ERROR: You did not provide a valid IP!", warning=True))
424424
print()
425425
# Validate LPORT
426-
elif key is "LPORT":
426+
elif key == "LPORT":
427427
if helpers.validate_port(value):
428428
selected_payload.required_options[key][0] = value
429429
else:

tools/ordnance/tool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def cli_menu(self, invoked=False):
9898
payload.cli_gen_shellcode()
9999
self.final_shellcode = payload.customized_shellcode
100100
# Check if an encoder is being called by the user
101-
if self.command_options.encoder is not None:
101+
if self.command_options.encoder != None:
102102
encoder_found_here = False
103103
if "BadChars" in payload.required_options:
104104
payload.required_options["BadChars"][0] = self.command_options.bad_chars
@@ -376,7 +376,7 @@ def use_payload(self, payload):
376376
self.payload_options['RHOST'] = rhost_out
377377

378378
# Check if encoder is needed
379-
if payload.required_options["Encoder"][0] is not "None":
379+
if payload.required_options["Encoder"][0] != "None":
380380
self.use_encoder(payload)
381381
self.final_shellcode = payload.customized_shellcode
382382

0 commit comments

Comments
 (0)