Skip to content

Commit 89d486e

Browse files
committed
Reintroduce reverted fragment
1 parent 203ead1 commit 89d486e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pwnlib/commandline/constgrep.py

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def main(args):
104104
continue
105105

106106
# Check the constant
107-
if constant != None:
107+
if constant is not None:
108108
val = getattr(mod, k)
109109
if args.mask_mode:
110110
if constant & val != val:
@@ -124,7 +124,7 @@ def main(args):
124124
# If we are in match_mode, then try to find a combination of
125125
# constants that yield the exact given value
126126
# We do not want to find combinations using the value 0.
127-
if not (constant == None or constant == 0) and args.mask_mode:
127+
if constant and args.mask_mode:
128128
mask = constant
129129
good = []
130130
out = [(v, k) for v, k in out if v != 0]

0 commit comments

Comments
 (0)