don't use eval
authorBryan Stitt <bryan@stitthappens.com>
Mon, 14 Jan 2013 01:29:28 +0000 (01:29 +0000)
committerBryan Stitt <bryan@stitthappens.com>
Mon, 14 Jan 2013 01:29:28 +0000 (01:29 +0000)
utils/__init__.py

index 95c6c17..a01d0e1 100644 (file)
@@ -74,7 +74,7 @@ def header_to_string(res):
 
 
 def hex_to_int(s):
-    return eval('0x' + s[::-1].encode('hex'))
+    return int('0x' + s[::-1].encode('hex'), 16)
 
 
 def header_from_string(s):