mirror of
https://github.com/The-Art-of-Hacking/h4cker
synced 2025-02-16 13:58:26 +00:00
Merge pull request #43 from cclauss/patch-1
Avoid SyntaxWarning on Python >= 3.8
This commit is contained in:
commit
cf6483d379
1 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ import ParseLogs
|
||||||
|
|
||||||
# callback for the user flag
|
# callback for the user flag
|
||||||
def user_call(option, opt_str, value, parser):
|
def user_call(option, opt_str, value, parser):
|
||||||
if len(parser.rargs) is not 0:
|
if len(parser.rargs) != 0:
|
||||||
value = parser.rargs[0]
|
value = parser.rargs[0]
|
||||||
else:
|
else:
|
||||||
value = None
|
value = None
|
||||||
|
@ -42,7 +42,7 @@ if __name__ == "__main__":
|
||||||
(options, args) = parser.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
# if they're trying to access /var/log/auth.log without proper privs, bail
|
# if they're trying to access /var/log/auth.log without proper privs, bail
|
||||||
if not os.getuid() is 0 and options.log is None:
|
if not os.getuid() == 0 and options.log is None:
|
||||||
print("[-] Please run with SUDO")
|
print("[-] Please run with SUDO")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue