forked from p15670423/monkey
Remove DNET library.
This commit is contained in:
parent
039cc1bd6c
commit
2949d4a8c2
|
@ -1,25 +1,27 @@
|
||||||
|
import logging
|
||||||
|
import ntpath
|
||||||
import os
|
import os
|
||||||
import sys
|
import os.path
|
||||||
|
import pprint
|
||||||
import socket
|
import socket
|
||||||
import struct
|
import struct
|
||||||
import ntpath
|
import sys
|
||||||
import pprint
|
|
||||||
import logging
|
|
||||||
import os.path
|
|
||||||
import urllib
|
import urllib
|
||||||
import monkeyfs
|
|
||||||
from difflib import get_close_matches
|
from difflib import get_close_matches
|
||||||
from network import local_ips
|
|
||||||
from transport import HTTPServer
|
|
||||||
from network.info import get_free_tcp_port, get_routes
|
|
||||||
from network.firewall import app as firewall
|
|
||||||
from impacket.dcerpc.v5 import transport, srvs
|
from impacket.dcerpc.v5 import transport, srvs
|
||||||
from impacket.dcerpc.v5.dcom.wmi import DCERPCSessionError
|
|
||||||
from impacket.smbconnection import SMBConnection, SMB_DIALECT
|
|
||||||
from impacket.smb3structs import SMB2_DIALECT_002, SMB2_DIALECT_21
|
|
||||||
from impacket.dcerpc.v5.dcomrt import DCOMConnection
|
|
||||||
from impacket.dcerpc.v5.dcom import wmi
|
from impacket.dcerpc.v5.dcom import wmi
|
||||||
|
from impacket.dcerpc.v5.dcom.wmi import DCERPCSessionError
|
||||||
|
from impacket.dcerpc.v5.dcomrt import DCOMConnection
|
||||||
from impacket.dcerpc.v5.dtypes import NULL
|
from impacket.dcerpc.v5.dtypes import NULL
|
||||||
|
from impacket.smb3structs import SMB2_DIALECT_002, SMB2_DIALECT_21
|
||||||
|
from impacket.smbconnection import SMBConnection, SMB_DIALECT
|
||||||
|
|
||||||
|
import monkeyfs
|
||||||
|
from network import local_ips
|
||||||
|
from network.firewall import app as firewall
|
||||||
|
from network.info import get_free_tcp_port, get_routes
|
||||||
|
from transport import HTTPServer
|
||||||
|
|
||||||
|
|
||||||
class DceRpcException(Exception):
|
class DceRpcException(Exception):
|
||||||
|
@ -387,13 +389,6 @@ class HTTPTools(object):
|
||||||
|
|
||||||
def get_interface_to_target(dst):
|
def get_interface_to_target(dst):
|
||||||
if sys.platform == "win32":
|
if sys.platform == "win32":
|
||||||
try:
|
|
||||||
import dnet
|
|
||||||
intf = dnet.intf()
|
|
||||||
inte = intf.get_dst(dnet.addr(dst))
|
|
||||||
return str(inte['addr']).split("/")[0]
|
|
||||||
except ImportError:
|
|
||||||
# dnet lib is not installed
|
|
||||||
return get_close_matches(dst, local_ips())[0]
|
return get_close_matches(dst, local_ips())[0]
|
||||||
else:
|
else:
|
||||||
# based on scapy implementation
|
# based on scapy implementation
|
||||||
|
@ -492,4 +487,3 @@ def get_binaries_dir_path():
|
||||||
return sys._MEIPASS
|
return sys._MEIPASS
|
||||||
else:
|
else:
|
||||||
return os.path.dirname(os.path.abspath(__file__))
|
return os.path.dirname(os.path.abspath(__file__))
|
||||||
|
|
||||||
|
|
|
@ -18,11 +18,7 @@ Windows:
|
||||||
Install the python packages listed in requirements.txt. Using pip install -r requirements.txt
|
Install the python packages listed in requirements.txt. Using pip install -r requirements.txt
|
||||||
7. Download and extract UPX binary to [source-path]\monkey\chaos_monkey\bin\upx.exe:
|
7. Download and extract UPX binary to [source-path]\monkey\chaos_monkey\bin\upx.exe:
|
||||||
http://upx.sourceforge.net/download/upx391w.zip
|
http://upx.sourceforge.net/download/upx391w.zip
|
||||||
8. (Optional) For some exploits to work better, install 'dnet' python library. You'll need to compile it for your OS
|
8. Run [source-path]\monkey\chaos_monkey\build_windows.bat to build, output is in dist\monkey.exe
|
||||||
or use a precompiled setup that can be found at:
|
|
||||||
32bit: https://github.com/Kondziowy/scapy_win64/raw/master/win32/dnet-1.12.win32-py2.7.exe
|
|
||||||
64bit: https://github.com/Kondziowy/scapy_win64/raw/master/win64/dnet-1.12.win-amd64-py2.7.exe
|
|
||||||
9. Run [source-path]\monkey\chaos_monkey\build_windows.bat to build, output is in dist\monkey.exe
|
|
||||||
|
|
||||||
Linux (Tested on Ubuntu 12.04):
|
Linux (Tested on Ubuntu 12.04):
|
||||||
1. Run:
|
1. Run:
|
||||||
|
|
Loading…
Reference in New Issue