Exemple #1
0
def run(args):
    factory = PacketSnifferDownstreamFactory()
    factory.profile = yield ProfileCLI.make_profile(args)
    factory.online_mode = args.online_mode
    factory.force_protocol_version = args.protocol_version

    if args.direction is not None:
        factory.packet_direction = args.direction + "stream"
    if args.packets is not None:
        packets = set()
        for direction, name in args.packets:
            assert direction in ('up', 'down')
            direction += 'stream'
            packets.add((direction, name))
        factory.packet_whitelist = packets

    factory.print_payload = args.print_payload
    factory.dump_payload = args.dump_payload

    if args.listen:
        listen = split_host_port(args.listen)
        listen_host = listen[0]
        listen_port = int(listen[1])
    else:
        listen_host = ""
        listen_port = 25565

    if args.connect:
        connect = split_host_port(args.connect)
        factory.connect_host = connect[0]
        factory.connect_port = int(connect[1])

    # Connect!
    yield factory.listen(listen_host, listen_port)
Exemple #2
0
def runargs(args, encrypt_tcp_q, decrypt_tcp_q):
    """
    Creates a Minecraft Client Bot, and connects to the Minecraft proxy.
    This assumes that the Minecraft Proxy is already running on another machine.
    """
    profile = yield ProfileCLI.make_profile(args)
    factory = MinecraftEncoderFactory(profile, encrypt_tcp_q, decrypt_tcp_q)
    factory.connect(args.host, args.port)
def run(args):
    # Log in
    profile = yield ProfileCLI.make_profile(args)

    # Create factory
    factory = MinecraftFactory(profile)

    # Connect!
    factory.connect(args.host, args.port)
def run(args):
    # Log in
    profile = yield ProfileCLI.make_profile(args)

    # Create factory
    factory = PlayerListFactory(profile)

    # Connect!
    factory.connect(args.host, args.port)
def run(args):
    # Log in
    profile = yield ProfileCLI.make_profile(args)

    # Create factory
    factory = MinecraftFactory(profile)

    # Connect!
    yield factory.connect(args.host, args.port)
def run(args):
    # Log in
    profile = yield ProfileCLI.make_profile(args)

    # Create factory
    factory = DataPackDumperFactory(profile)
    factory.output_path = args.output_path

    # Connect!
    factory.connect(args.host, args.port)
def run(args, xcoor, ycoor, zcoor):
    # Log in
    profile = yield ProfileCLI.make_profile(args)

    # Create factory
    factory = ChunkFactory(profile)
    factory.transferCoor(xcoor, ycoor, zcoor)

    # Connect!
    factory.connect(args.host, args.port)