diff --git a/client/pm3_eml2mfd.py b/client/pm3_eml2mfd.py index 5f9e7b233..86c6df301 100755 --- a/client/pm3_eml2mfd.py +++ b/client/pm3_eml2mfd.py @@ -15,7 +15,7 @@ def main(argv): if argc < 3: print 'Usage:', argv[0], 'input.eml output.mfd' sys.exit(1) - + with file(argv[1], "r") as file_inp, file(argv[2], "wb") as file_out: for line in file_inp: line = line.rstrip('\n').rstrip('\r') diff --git a/client/pm3_eml_mfd_test.py b/client/pm3_eml_mfd_test.py index d83b578f2..478a050df 100644 --- a/client/pm3_eml_mfd_test.py +++ b/client/pm3_eml_mfd_test.py @@ -11,7 +11,7 @@ import pm3_eml2mfd, pm3_mfd2eml class TestEmlMfd(unittest.TestCase): def setUp(self): self.tmpdir = mkdtemp() - + def tearDown(self): rmtree(self.tmpdir) @@ -46,7 +46,7 @@ def hex_c14n(inp): """ Canonicalizes the input string by removing non-hexadecimal characters and making everything uppercase - """ + """ return ''.join(c.upper() for c in inp if c in hexdigits) if __name__ == '__main__': diff --git a/tools/findbits.py b/tools/findbits.py index 1860964b1..501d23019 100755 --- a/tools/findbits.py +++ b/tools/findbits.py @@ -1,10 +1,10 @@ #!/usr/bin/python # findbits.py - find Binary, Octal, Decimal or Hex number in bitstream -# +# # Adam Laurie # http://rfidiot.org/ -# +# # This code is copyright (c) Adam Laurie, 2009, All rights reserved. # For non-commercial use only, the following terms apply - for all other # uses, please contact the author: @@ -77,7 +77,7 @@ def main(): print os._exit(True) - bases= { + bases= { 2:'BINARY', 8:'OCTAL', 10:'DECIMAL', diff --git a/tools/findbits_test.py b/tools/findbits_test.py index 0194813e3..3288cb35b 100644 --- a/tools/findbits_test.py +++ b/tools/findbits_test.py @@ -56,13 +56,13 @@ class TestFindBits(unittest.TestCase): class OutputBuffer(object): def __init__(self): self.clear_buffer() - + def clear_buffer(self): self.content = '' - + def write(self, data): self.content += data if __name__ == '__main__': - unittest.main() + unittest.main() \ No newline at end of file diff --git a/tools/xorcheck.py b/tools/xorcheck.py index 3a7c8d66c..73eeb4a7f 100755 --- a/tools/xorcheck.py +++ b/tools/xorcheck.py @@ -1,10 +1,10 @@ #!/usr/bin/python # xorcheck.py - find xor values for 8-bit LRC -# +# # Adam Laurie # http://rfidiot.org/ -# +# # This code is copyright (c) Adam Laurie, 2009, All rights reserved. # For non-commercial use only, the following terms apply - for all other # uses, please contact the author: