mirror of https://github.com/n1nj4sec/pupy.git
Don't track actual default configuration file. Instead create it from tracked default
This commit is contained in:
parent
d8b492b5c7
commit
bcb813f839
|
@ -39,6 +39,7 @@ pupy/modules/lib/*.py[cod]
|
|||
pupy/modules/lib/**/*.py[cod]
|
||||
pupy/network/**/*.pyc
|
||||
pupy/scriptlets/**/*.pyc
|
||||
pupy/pupy.conf
|
||||
|
||||
# do not ignore package & templates files
|
||||
!pupy/packages/
|
||||
|
|
|
@ -29,6 +29,8 @@ from pupylib.utils.rpyc_utils import obtain
|
|||
from .PupyTriggers import on_connect
|
||||
from network.lib.utils import parse_transports_args
|
||||
from network.lib.base_launcher import LauncherError
|
||||
from os import path
|
||||
from shutil import copyfile
|
||||
import network.conf
|
||||
import rpyc
|
||||
import shlex
|
||||
|
@ -53,6 +55,8 @@ class PupyServer(threading.Thread):
|
|||
self.clients_lock=threading.Lock()
|
||||
self.current_id=1
|
||||
self.config = configparser.ConfigParser()
|
||||
if not path.exists('pupy.conf'):
|
||||
copyfile('pupy.conf.default', 'pupy.conf')
|
||||
self.config.read("pupy.conf")
|
||||
if port is None:
|
||||
self.port=self.config.getint("pupyd", "port")
|
||||
|
|
Loading…
Reference in New Issue