Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
The rda package provides a Python-based toolkit for automating and managing remote desktop actions, including capturing and replaying keyboard and mouse events
This project provides a Python-based remote control application that allows users to remotely control another computer's mouse and keyboard and view its screen in real-time. It uses sockets for communication, OpenCV for screen display, and pynput
for capturing and simulating mouse and keyboard events.
You can install Poetry by following the instructions on the Poetry installation page.
Clone the repository:
git clone https://github.com/your-username/remote-control.git
cd remote-control
Install the dependencies using Poetry:
poetry install
Activate the virtual environment:
poetry shell
To start the server, run:
poetry run python remote_control.py -s
The server will display a code which can be used by the client to connect.
To start the client, run:
poetry run python remote_control.py -c <code>
Replace <code>
with the code provided by the server.
If no arguments are provided, the script will prompt you to choose between running as a server or client:
poetry run python remote_control.py
Follow the prompts to run the application.
ActionReplayer
ClassHandles the replaying of mouse and keyboard events.
Attributes:
screen_width
, screen_height
: Screen dimensions.events
: List of events to replay.kController
: Keyboard controller.mController
: Mouse controller.Methods:
get_key(key_str)
: Converts a key string to a pynput
key object.replay(event)
: Replays a single event.ActionRecorder
ClassHandles the recording of mouse and keyboard events.
Attributes:
screen_width
, screen_height
: Screen dimensions.mController
: Mouse controller.mouse
: Mouse event handler.kController
: Keyboard controller.keyboard
: Keyboard event handler.Methods:
on_move(x, y)
: Handles mouse move events.on_click(x, y, button, pressed)
: Handles mouse click events.on_scroll(x, y, dx, dy)
: Handles mouse scroll events.on_press(key)
: Handles key press events.on_release(key)
: Handles key release events.ScreenReplayer
ClassHandles the display of screen data.
display_image(image_data)
: Displays the received screen data.stop()
: Stops the screen display.ScreenRecorder
ClassCaptures and encodes the screen.
get_screen_image()
: Captures the screen and returns the encoded image data.Host
ClassManages the server-side of the connection.
Attributes:
mouse
, keyboard
, screen
: Sockets for mouse, keyboard, and screen data.Methods:
create_socket(port)
: Creates and binds a socket to a given port.connect_socket(server_socket)
: Listens for and accepts a connection.show_screen(screen_replayer)
: Continuously receives and displays screen data.handle_mouse(data)
: Handles mouse data received from the client.handle_keyboard(data)
: Handles keyboard data received from the client.Client
ClassManages the client-side of the connection.
Attributes:
mouse
, keyboard
, screen
: Sockets for mouse, keyboard, and screen data.Methods:
create_socket(ip, port)
: Creates a socket and connects it to a given IP and port.screen_share()
: Continuously captures and sends screen data.handle_mouse()
: Continuously receives and replays mouse events.handle_keyboard()
: Continuously receives and replays keyboard events.This project is licensed under the MIT License.
This project uses the following libraries and resources:
Feel free to customize this README file further based on your needs and any additional features you may add to the project.
FAQs
The rda package provides a Python-based toolkit for automating and managing remote desktop actions, including capturing and replaying keyboard and mouse events
We found that rda demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.