mirror of https://github.com/n1nj4sec/pupy.git
change default conf to make it works on a internal pentest without internet access
This commit is contained in:
parent
9bddbc57a9
commit
8b6beb8334
|
@ -4,9 +4,18 @@
|
|||
transport = ssl
|
||||
port = 443
|
||||
ipv6 = true
|
||||
igd = true
|
||||
|
||||
#igd=True allow pupy to make UPNP requests to get you external IP.
|
||||
igd = false
|
||||
|
||||
#httpd=true wraps your transport in a HTTP transport.
|
||||
httpd = false
|
||||
dnscnc = localhost:5454
|
||||
|
||||
#dnscnc = localhost:5454 starts the DNS cnc listener on the port 5454.
|
||||
dnscnc = false
|
||||
|
||||
# allow requests to services like ifconfig.co to automatically retrieve public IP
|
||||
allow_requests_to_external_services = false
|
||||
|
||||
[ssl]
|
||||
client_cert_required = true
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import logging
|
||||
from PupyCredentials import Credentials
|
||||
from network.lib.picocmd.server import *
|
||||
from network.lib.picocmd.picocmd import *
|
||||
|
@ -64,6 +64,7 @@ class PupyDnsCnc(object):
|
|||
|
||||
credentials = credentials or Credentials()
|
||||
config = config or PupyConfig()
|
||||
self.config = config
|
||||
|
||||
connect_host = connect_host or config.getip('pupyd', 'address')
|
||||
|
||||
|
@ -201,7 +202,8 @@ class PupyDnsCnc(object):
|
|||
def _external_ip(self):
|
||||
if self.igd and self.igd.available:
|
||||
return self.igd.GetExternalIP()['NewExternalIPAddress']
|
||||
else:
|
||||
elif self.config.getboolean('pupyd', 'allow_requests_to_external_services'):
|
||||
logging.warning("Sending HTTP request to http://ifconfig.co to retrieve public IP ...")
|
||||
response = requests.get('http://ifconfig.co', headers={
|
||||
'User-Agent': 'curl/7.50.0'
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue