Rust implementation of world of warcraft client v3.3.5a (smart CLI)

Overview

idewave-cli

This is Rust implementation of World of Warcraft client v3.3.5a. Smart CLI.

You can use the CLI to debug TCP packets from/to World of Warcraft Server. Or send your own (need to implement handlers). Also, you can use it as bot (but you need to implement actions by yourself, see MovementAI for example).

How to start

  • Rename Config.yml.dist into Config.yml, then edit it according to your preferences.
  • Rename .env.example into .env and edit it according to your preferences.
  • Run command: cargo run -r

Features

  • Authentication (without reconnection)
  • Update packets, chat, movement
  • UI with keyboard interaction (including history scrolling and details output in DEBUG mode)

You want to contribute

It's always welcome. Just create pull request with your improvements, bugfix etc.

Comments
  • new major version

    new major version

    Global updates

    • implemented proc macroses (LoginPacket, WorldPacket) to provide handy approach to packet building. Macroses support #[dynamic_field] attribute to let user implement own way of parsing field. Also implemented with_opcode! declarative macro to make it easier to attach opcode to packet parser. Opcode is required and should be added via with_opcode! macro or manually if not removed explicitly (need to set #[options(no_opcode)] option on top of struct).
    • added support for .env file and such params as host or port to connect are moved into it (file is private and will not be commited)
    • on UI side: implemented debug details panel which will appear only in DEBUG mode. Supported scroll via output history by keyboard arrows (up/down), improved MessageIncome::send_<type>_message methods, so it is possible to send string details to show in debug details output. To scroll debug details panel should be used CTRL + arrows (up/down). Also added info panel to show some additional info like total input/output packets and current/total output items (DEBUG only)
    • added customizable errors (anyhow and thiserror crates), improved error output, a lot of unwrap are refactored into results
    opened by sergio-ivanuzzo 0
  • feat: IC-56 - implemented macro for building packets; global refactoring

    feat: IC-56 - implemented macro for building packets; global refactoring

    This PR is a part of global project refactoring.

    First of all, I implemented WorldPacket and LoginPacket proc macroses to make packets description easier. Also was implemented with_opcode! which is required for outcome packets because proc macros should know how to build header where opcode is used (macros generates Self::opcode() method, so more verbose alternative is just implement this method on the struct). Proc macroses allow to declare dynamic fields, so this field can be built in another way described in method which name should be same as field.

    #[derive(WorldPacket, Debug)]
    #[options(no_opcode)]
    #[allow(dead_code)]
    struct Income {
        message_type: u8,
        language: u32,
        sender_guid: u64,
        skip: u32,
        #[dynamic_field]
        channel_name: String,
        target_guid: u64,
        message_length: u32,
        #[dynamic_field]
        message: String,
    }
    
    impl Income {
        fn message<R: BufRead>(mut reader: R, initial: &mut Self) -> String {
            let mut buffer = vec![0u8; initial.message_length as usize];
            reader.read_exact(&mut buffer).unwrap();
            String::from_utf8(buffer).unwrap()
        }
    
        fn channel_name<R: BufRead>(mut reader: R, initial: &mut Self) -> String {
            if initial.message_type == MessageType::CHANNEL {
                let mut buffer = Vec::new();
                reader.read_until(0, &mut buffer).unwrap();
                String::from_utf8(buffer).unwrap()
            } else {
                String::default()
            }
        }
    }
    

    dynamic field can be used in case when need to parse field conditionally or when field depends on another field. Also it is possible to build packets with dynamic opcode, for this purpose need to use .unpack_with_opcode(opcode) on Outcome packets instead of just .unpack().

    fn build_movement_packet(
        opcode: u32,
        guid: u64,
        new_position: Position,
        movement_flags: MovementFlags
    ) -> (u32, Vec<u8>) {
        let now = SystemTime::now().duration_since(SystemTime::UNIX_EPOCH).unwrap();
        Outcome {
            guid: PackedGuid(guid),
            movement_flags: movement_flags.bits(),
            movement_flags2: MovementFlagsExtra::NONE.bits(),
            // TODO: need to investigate how better get u32 value from timestamp
            time: now.as_millis() as u32,
            x: new_position.x,
            y: new_position.y,
            z: new_position.z,
            direction: new_position.orientation,
            unknown: 0
        }.unpack_with_opcode(opcode)
    }
    

    Also within this PR added pretty output for packet details, fixed UI history scrolling (when select specific output details panel show wrong text).

    Added support for .env files to store sensitive data (currently host to connect).

    Refactored .send_<>_message methods of MessageIncome, now this methods receive extra optional String param to allow output extra data in debug details panel.

    UI updates

    • Added extra info panel to show additional output (incoming/outcoming counter; in DEBUG mode shows selected/total items).
    • Added scrolling for details panel (using CTRL + arrows UP/DOWN)
    • Added support for PageUp/PageDown fast scroll; added support for Home/End fast scroll to select first/last item in output
    • Fixed UI freeze when switch between modes
    opened by sergio-ivanuzzo 0
  • feat: IC-56 - added output for extra details on debug messages

    feat: IC-56 - added output for extra details on debug messages

    Within this PR added next features:

    • added extra panel that will be displayed in DEBUG mode, this panel need to output extra details on debug messages
    • added scrolling through messages history (client stores last selected message, so if turn off DEBUG mode output will be scrolled to most recent message, but when turn on again client will scroll to last selected message)

    Notice: history scrolling will work ONLY in DEBUG mode. For now I see no sense to allow it without extra output.

    opened by sergio-ivanuzzo 0
  • fix: IC-52 - refactored code into async; fixed reader; fixed deadlocks

    fix: IC-52 - refactored code into async; fixed reader; fixed deadlocks

    Handlers now async, so async code is possible to be used directly there. Also were fixed deadlocks by decreasing scope of mutex using. Packet reader was fixed and now it works correctly when server send partial packet (see BufReader in stream.rs).

    opened by sergio-ivanuzzo 0
  • feat: IC-39 - added support for modes

    feat: IC-39 - added support for modes

    In this PR:

    • added modes support (currently only debug mode, later will be added more modes). Each mode affect client flag, then affect internal UI renderer state. This state will be used for internal components.
    • refactored key input processing (so each component handle own part)
    opened by sergio-ivanuzzo 0
  • feat: IC-36 - added popup components and added interactivity

    feat: IC-36 - added popup components and added interactivity

    Within this PR:

    • added popup for select character and popup for select realm
    • support keyboard events (resize and mouse supported but not used for now)
    • refactored file structure and code, all interprocess communication (ipc) structures were moved into ipc dir
    • added HandlerOutput::Freeze type which should be used when need to wait for user input
    • replaced async mutex with std::sync::mutex, this way deadlocks were fixed
    • replaced async packet read with immediate try_read, so now app should be faster (since there no need to fix read timeout according to server)
    • refactored way of how handlers processed. Now each handler result processed immediately, so it's more convenient to process handler result
    • some I/O tasks were refactored to be spawn via spawn_blocking to guarantee that spawn will be inside another thread. This way keyboard output become processed immediately
    opened by sergio-ivanuzzo 0
  • feat: IC-34 - refactored app into UI

    feat: IC-34 - refactored app into UI

    Within this feature was used tui-rs crate to implement base layout for my application.

    Now instead of println! output all data is send to UI using mpsc channel.

    opened by sergio-ivanuzzo 0
  • fix: IC-28 - fix tests on remote side

    fix: IC-28 - fix tests on remote side

    On local side tests runned OK, on github actions almost all tests where I use TCP connection are failed. Within this branch trying to find the reason.

    opened by sergio-ivanuzzo 0
Owner
null
CLI for the Goki Smart Wallet system.

goki-cli CLI for the Goki Smart Wallet system. Installation First, make sure you have the Solana CLI tools installed. Follow the instructions here. Ne

Goki Protocol 18 Jul 18, 2022
World's first, but possibly worst, blinky for the pico in Rust

pico-blink-rs Running Rust code on the Raspberry Pi Pico Booting The RP2040 has external QSPI flash. There is an internal mask-ROM bootloader which ca

rp-rs 129 Dec 24, 2022
A Rust program/library to write a Hello World message to the standard output.

hello-world Description hello-world is a Rust program and library that prints the line Hello, world! to the console. Why was this created? This progra

null 0 May 11, 2022
Benson Box built on Substrate for a world UNcorporated.

Benson Box Benson Box built on Substrate. For getting started and technical guides, please refer to the Benson Wiki. Contributing All PRs are welcome!

Arthur·Thomas 13 Mar 13, 2022
Show active TCP connections on a TUI world map.

Maperick Show active TCP connections on a TUI world map. Still WIP, but it's gonna be good. Setup git clone [email protected]:schlunsen/maperick.git cd m

Rasmus Schlünsen 5 Jul 8, 2022
🪐 An out-of-this-world greeter for your terminal

Draconis ?? An out-of-this-world greeter for your terminal Requirements pacman-contrib for pacman Important This program uses the openweathermap API f

Mars 11 Dec 17, 2022
Navigate in the world of ESP32 with easy. Tool for maintaining development environment.

ESP Helm Get all important information for Embedded Development with ESP32 and mainitain the development environment. Check out releases for binary ve

Juraj Michálek 4 Aug 7, 2023
ratlab is a programming platform designed loosely for hobbyist and masochist to analyse and design stuff and things that transform our world?

ratlab A programming language developed by Quinn Horton and Jay Hunter. ratlab is a programming platform designed loosely for hobbyists and masochists

Jay 10 Sep 4, 2023
A grub theme in the style of the Minecraft singleplayer (sp) world selection screen!

Minecraft World Selection Grub Theme Wowie, another Minecraft grub theme! But this time it's in the style of the singleplayer world selection menu, wh

null 3 Oct 8, 2023
Provides a mock Ambi client that emulates real sensor hardware such as an Edge client

ambi_mock_client Provides a mock Ambi client that emulates real sensor hardware such as an Edge client. Usage You must have Rust installed to build am

Rust Never Sleeps 2 Apr 1, 2022
Command line utility for controlling LIFX smart lights

lifxc is a command line utility for controlling LIFX smart lights. Currently, communication over the LIFX LAN protocol is supported.

Harrison Rigg 1 Nov 17, 2021
A slightly smart clipboard tool - leverage the filesystem to persist across machines after shutdown.

clipd A slightly smart clipboard using the filesystem under ~/.clipd to persist after shutdown. cowsay "clipd is great" | clipd copy clipd paste ____

null 5 Aug 9, 2022
Haylou Smart Watch 2 (LS02) reverse-engineering project

Haywatch Haywatch Hello Haylou Watch features Device communication General command structure Pairing Unpairing Battery Firmware Date and time Pulses U

XorTroll 5 Dec 16, 2022
zkPoEX enables white hat hackers to report live vulnerabilities in smart contracts while maintaining the confidentiality of the exploit

zkPoEX enables white hat hackers to report live vulnerabilities in smart contracts while maintaining the confidentiality of the exploit, facilitating efficient communication and collaboration between hackers and project owners for a more secure DeFi ecosystem.

zkoranges 135 Apr 16, 2023
A cute and smart arm warmer sleeve ^_^

LuLuu! A cute and smart arm-warmer sleeve with a 1.3" full color TFT display built into the back of the hand ^_^ Hardware Runs on a RaspberryPi RP2040

Gray Olson 3 Oct 17, 2023
🚧 Meta Programming language automating multilang communications in a smart way

Table of Contents Merge TLDR Manifest merge-lang Inference File Structure Compile Scheduling Execution Runtime Package Manager API Merge NOTE: Any of

camel_case 4 Oct 17, 2023
Configurable, smart and fast CSS/SCSS/Sass/Less formatter.

?? Malva Malva is a configurable, smart and fast CSS/SCSS/Sass/Less formatter. Why? Configurable Malva is configurable. It provides several configurat

Pig Fang 20 Oct 27, 2023
A Rust CLI tool that helps you enforce Git policies through Git hooks both server and client side

GitPolicyEnforcer This is a command line utility written in Rust, that helps you utilize Git hooks, to enforce various policies. It currently supports

Vagelis Prokopiou 4 Aug 14, 2022
Nostr CLI client built with Rust

Nostr CLI client built with Rust Encrypted chat inside Nostr leaks metadata of who talks to who. This small CLI app implements a "public inbox," which

Vincent Liao 10 Dec 19, 2022