Commit c3f817ab by fwkz

Adding boolify() helper function.

parent dbe56604
......@@ -8,6 +8,7 @@ from routersploit.utils import (
LockedIterator,
random_text,
http_request,
boolify,
)
from routersploit import exploits
......
......@@ -11,6 +11,7 @@ from routersploit import (
LockedIterator,
print_success,
print_table,
boolify,
)
......@@ -35,6 +36,7 @@ class Exploit(exploits.Exploit):
credentials = []
def run(self):
print self.verbosity
self.credentials = []
ssh = paramiko.SSHClient()
......@@ -70,7 +72,7 @@ class Exploit(exploits.Exploit):
print_error("Credentials not found")
def target_function(self, running, data):
module_verbosity = bool(self.verbosity)
module_verbosity = boolify(self.verbosity)
name = threading.current_thread().name
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
......
from __future__ import print_function
import threading
from functools import wraps
from distutils.util import strtobool
import sys
import random
import string
......@@ -272,3 +273,7 @@ def http_request(method, url, **kwargs):
except requests.RequestException as error:
print_error(error)
return
def boolify(value):
return strtobool(value)
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