Convert scripts to python3
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import argparse
|
||||
import binascii
|
||||
import ConfigParser
|
||||
import configparser
|
||||
import sys
|
||||
|
||||
from pybloom import BloomFilter
|
||||
|
||||
def main():
|
||||
default_config_file='/nsrl/nsrl.conf'
|
||||
config = ConfigParser.ConfigParser()
|
||||
config = configparser.ConfigParser()
|
||||
config.read(default_config_file)
|
||||
#add commandline options
|
||||
hash_type=config.get('config','hashfile_type')
|
||||
@@ -54,11 +54,11 @@ def main():
|
||||
output = "{}".format(hash_hex)
|
||||
else:
|
||||
output = "{}:{}".format("+"if hash_is_a_match else "-",hash_hex)
|
||||
print output
|
||||
print(output)
|
||||
return
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
main()
|
||||
except Exception as e:
|
||||
print "Error: %s" % e
|
||||
print("Error: %s" % e)
|
||||
|
||||
Reference in New Issue
Block a user