Example #1
0
def loadConfiguration():
    configuration = Configuration(Z_CONFIG_FILE_LOCATIONS)
    configuration.load()

    parser = ArgumentParser()
    parser.add_argument("-resume", metavar="SESSION", type=str, help="existing session file to resume")
    parser.add_argument("-host", type=str, help="remote host")
    parser.add_argument("-port", type=int, help="remote port", default=Z_DEFAULT_PORT)
    parser.add_argument("-cipher", type=str, help="encryption scheme (aes, blowfish)", default="aes")
    parser.add_argument("-identity", type=str, help="identity keyfile")
    parser.add_argument("--verbose", help="print more information", action="store_true")
    parser.add_argument("target", type=str, help="remote file/folder to download", nargs="?")
    parser.parse_args(namespace=configuration)

    return configuration
Example #2
0
def loadConfiguration():
    configuration = Configuration(Z_CONFIG_FILE_LOCATIONS)
    configuration.load()

    parser = ArgumentParser()
    parser.add_argument(
        '-bindhost',
        type=str,
        help='bind to an interface',
        default=''
    )
    parser.add_argument(
        '-bindport',
        type=int,
        help='bind to a port',
        default=Z_DEFAULT_PORT
    )
    parser.add_argument(
        '-host',
        type=str,
        help='remote host'
    )
    parser.add_argument(
        '-port',
        type=int,
        help='remote port',
        default=Z_DEFAULT_PORT
    )
    parser.add_argument(
        '--verbose',
        help='print more information',
        action='store_true'
    )
    parser.parse_args(namespace=configuration)

    return configuration
Example #3
0
def loadConfiguration():
    configuration = Configuration(Z_CONFIG_FILE_LOCATIONS)
    configuration.load()

    parser = ArgumentParser()
    parser.add_argument(
        '-bindhost',
        type=str,
        help='bind to an interface',
        default=''
    )
    parser.add_argument(
        '-bindport',
        type=int,
        help='bind to a port',
        default=Z_DEFAULT_PORT
    )
    parser.add_argument(
        '-identity',
        type=str,
        help='identity keyfile'
    )
    parser.add_argument(
        '-rootpath',
        type=str,
        help='directory to serve files from',
        default='.'
    )
    parser.add_argument(
        '--verbose',
        help='print more information',
        action='store_true'
    )
    parser.parse_args(namespace=configuration)

    return configuration