コード例 #1
0
ファイル: client.py プロジェクト: therodfather/geneva
    def get_args(command):
        """
        Defines required args for this plugin
        """
        super_args = ClientPlugin.get_args(command)
        parser = argparse.ArgumentParser(description='Discard Client')

        # If we know whether the censor we are training against injects content, we can optimize the plugin's behavior.
        # Censors that inject content will give us a very clear signal - after we send content, we can use `recv()` to get
        # the response from the censor. Since this is the discard protocol, if we ever receive data, this is from the censor.
        parser.add_argument(
            '--injection-censor',
            action='store_true',
            help="whether this censor injects content or sends RSTs to censor")
        parser.add_argument('--server',
                            action='store',
                            help="server to connect to")
        # Makes it easier to craft fake HTTP requests to trip censorship
        parser.add_argument(
            '--http-request',
            action='store',
            help=
            "send an HTTP get request with the given hostname to the discard server"
        )

        args, _ = parser.parse_known_args(command)
        args = vars(args)

        super_args.update(args)
        return super_args
コード例 #2
0
    def get_args(command):
        """
        Defines required args for this plugin
        """
        super_args = ClientPlugin.get_args(command)
        parser = argparse.ArgumentParser(description='Echo Client')

        parser.add_argument(
            '--injection-censor',
            action='store_true',
            help="whether this censor injects content or sends RSTs to censor")
        parser.add_argument('--server',
                            action='store',
                            help="server to connect to")
        parser.add_argument(
            '--http-request',
            action='store',
            help=
            "send an HTTP get request with the given hostname to the echo server"
        )

        args, _ = parser.parse_known_args(command)
        args = vars(args)

        super_args.update(args)
        return super_args
コード例 #3
0
ファイル: client.py プロジェクト: therodfather/geneva
    def get_args(command):
        """
        Defines required args for this plugin
        """
        super_args = ClientPlugin.get_args(command)
        parser = argparse.ArgumentParser(description='HTTP Client', prog="http/client.py")

        parser.add_argument('--host-header', action='store', default="", help='specifies host header for HTTP request')
        parser.add_argument('--injected-http-contains', action='store', default="", help='checks if injected http response contains string')

        args, _ = parser.parse_known_args(command)
        args = vars(args)

        super_args.update(args)
        return super_args
コード例 #4
0
ファイル: client.py プロジェクト: therodfather/geneva
    def get_args(command):
        """
        Defines required args for this plugin
        """
        super_args = ClientPlugin.get_args(command)
        parser = argparse.ArgumentParser(description='ESNI Client')

        parser.add_argument('--server',
                            action='store',
                            help="server to connect to")

        args, _ = parser.parse_known_args(command)
        args = vars(args)

        super_args.update(args)
        return super_args
コード例 #5
0
    def get_args(command):
        """
        Defines required args for this plugin
        """
        super_args = ClientPlugin.get_args(command)
        parser = argparse.ArgumentParser(description='SMTP Client')

        parser.add_argument('--server',
                            action='store',
                            help="server to connect to")
        parser.add_argument(
            '--smtp-request',
            action='store_true',
            help='Send an SMTP byte string that triggers censorship')

        args, _ = parser.parse_known_args(command)
        args = vars(args)

        super_args.update(args)
        return super_args
コード例 #6
0
ファイル: client.py プロジェクト: therodfather/geneva
    def get_args(command):
        """
        Defines required args for this plugin
        """
        super_args = ClientPlugin.get_args(command)
        parser = argparse.ArgumentParser(description='HTTP Client')

        parser.add_argument('--server',
                            action='store',
                            default="www.wikipedia.org",
                            help='SNI request to make')
        parser.add_argument('--injected-cert-contains',
                            action='store',
                            help='text that injected cert will contain')
        parser.add_argument('--ip',
                            action='store',
                            help='IP address to send the request to')

        args, _ = parser.parse_known_args(command)
        args = vars(args)

        super_args.update(args)
        return super_args
コード例 #7
0
    def get_args(command):
        """
        Defines args for this plugin
        """
        super_args = ClientPlugin.get_args(command)

        parser = argparse.ArgumentParser(description="India SNI client")

        parser.add_argument("--server",
                            action='store',
                            help='server to connect to')
        parser.add_argument("--sni",
                            action="store",
                            help="sni to include in tls client hello")
        parser.add_argument("--timeout",
                            action="store",
                            help="timeout for requests",
                            type=int)

        args, _ = parser.parse_known_args(command)
        args = vars(args)
        super_args.update(args)

        return super_args