Reorder Module Imports
This commit is contained in:
parent
4aafbc316a
commit
873896ea5b
@ -2,12 +2,10 @@
|
|||||||
import socket
|
import socket
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from pprint import pprint
|
|
||||||
from argparse import ArgumentParser, SUPPRESS
|
from argparse import ArgumentParser, SUPPRESS
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from ssl import PROTOCOL_TLSv1
|
from ssl import PROTOCOL_TLSv1
|
||||||
|
|
||||||
import socks
|
|
||||||
try:
|
try:
|
||||||
from OpenSSL import SSL
|
from OpenSSL import SSL
|
||||||
except ImportError:
|
except ImportError:
|
||||||
@ -27,6 +25,7 @@ class Clr:
|
|||||||
def get_cert(host, port, user_args):
|
def get_cert(host, port, user_args):
|
||||||
"""Connection to the host."""
|
"""Connection to the host."""
|
||||||
if user_args.socks:
|
if user_args.socks:
|
||||||
|
import socks
|
||||||
socks_host, socks_port = filter_hostname(user_args.socks)
|
socks_host, socks_port = filter_hostname(user_args.socks)
|
||||||
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, socks_host, int(socks_port), True)
|
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, socks_host, int(socks_port), True)
|
||||||
socket.socket = socks.socksocket
|
socket.socket = socks.socksocket
|
||||||
@ -127,6 +126,7 @@ def show_result(user_args):
|
|||||||
# Enable JSON output if -j argument specified
|
# Enable JSON output if -j argument specified
|
||||||
if user_args.json_true:
|
if user_args.json_true:
|
||||||
if user_args.pretty_output:
|
if user_args.pretty_output:
|
||||||
|
from pprint import pprint
|
||||||
pprint(context)
|
pprint(context)
|
||||||
else:
|
else:
|
||||||
print(context)
|
print(context)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user