mirror of https://github.com/n1nj4sec/pupy.git
Add option to disable automatic IGD mapping
This commit is contained in:
parent
ff17852d66
commit
3aec3bf641
|
@ -89,6 +89,7 @@ class IGDClient:
|
|||
|
||||
def __init__(
|
||||
self,
|
||||
available=True,
|
||||
bindIP='0.0.0.0',
|
||||
ctrlURL=None,
|
||||
service="WANIPC",
|
||||
|
@ -99,6 +100,11 @@ class IGDClient:
|
|||
- intIP is the source address of the request packet, which implies the source interface
|
||||
- ctrlURL is the the control URL of IGD server, client will do discovery if it is None
|
||||
"""
|
||||
|
||||
if not available:
|
||||
self.ctrlURL = None
|
||||
return
|
||||
|
||||
self.debug = edebug
|
||||
self.pprint = pprint
|
||||
self.isv6 = False
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
transport = ssl
|
||||
port = 443
|
||||
ipv6 = true
|
||||
igd = true
|
||||
|
||||
[cmdline]
|
||||
display_banner = yes
|
||||
|
|
|
@ -37,6 +37,7 @@ from pupylib import PupyServer
|
|||
from pupylib import PupyDnsCnc
|
||||
from pupylib import PupyCmdLoop
|
||||
from pupylib import PupyCredentials
|
||||
from pupylib import PupyConfig
|
||||
from pupylib import __version__
|
||||
|
||||
from network.lib.igd import IGDClient, UPNPError
|
||||
|
@ -87,8 +88,12 @@ if __name__=="__main__":
|
|||
# Try to initialize credentials before CMD loop
|
||||
PupyCredentials.Credentials()
|
||||
|
||||
config = PupyConfig()
|
||||
|
||||
try:
|
||||
igd = IGDClient()
|
||||
igd = IGDClient(
|
||||
available=config.getboolean('pupyd', 'igd')
|
||||
)
|
||||
except UPNPError as e:
|
||||
pass
|
||||
|
||||
|
|
Loading…
Reference in New Issue