We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 203ead1 commit 89d486eCopy full SHA for 89d486e
pwnlib/commandline/constgrep.py
100644
100755
@@ -104,7 +104,7 @@ def main(args):
104
continue
105
106
# Check the constant
107
- if constant != None:
+ if constant is not None:
108
val = getattr(mod, k)
109
if args.mask_mode:
110
if constant & val != val:
@@ -124,7 +124,7 @@ def main(args):
124
# If we are in match_mode, then try to find a combination of
125
# constants that yield the exact given value
126
# We do not want to find combinations using the value 0.
127
- if not (constant == None or constant == 0) and args.mask_mode:
+ if constant and args.mask_mode:
128
mask = constant
129
good = []
130
out = [(v, k) for v, k in out if v != 0]
0 commit comments