Send USB Scancodes to a VMware vSphere Virtual Machine
Project description
Transmit keystrokes to a running vSphere virtual machine via pyvmomi.
Can be used either as a command-line tool directly, or import as a module.
Usage
usage: send-keys-to-vm [--file in.txt] [--characters 'a long line of text'] [--raw-scancode I]
[--modifier {shift,alt,meta,ctrl}] [--moref MOREF] [--uuid UUID] [--ip IP] [-v] [--whatif]
[--insecure] [--hostname vCenter Server or ESXi host] [--port vCenter Server Port]
[--username USERNAME] [--password PASSWORD]
[keys ...]
Examples
Pass characters as a quoted string.
send-keys-to-vm --characters "sudo tailscale up --auth-key=tskey-auth-1234567890 --ssh"
Open a config file for appending, then stream in some text.
echo "cat >> .ssh/authorized_keys" | send-keys-to-vm --moref 24
`cat ~/.ssh/id_rsa.pub | send-keys-to-vm --moref 24 --file -`
.venv/bin/send-keys-to-vm --moref 24 ctrl+d
Dump raw KeyEvent list.
send-keys-to-vm a b C ctrl+d --whatif
(vim.vm.UsbScanCodeSpec.KeyEvent) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
usbHidCode = 262151,
modifiers = <unset>
}
(vim.vm.UsbScanCodeSpec.KeyEvent) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
usbHidCode = 327687,
modifiers = <unset>
}
(vim.vm.UsbScanCodeSpec.KeyEvent) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
usbHidCode = 393223,
modifiers = (vim.vm.UsbScanCodeSpec.ModifierType) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
leftControl = <unset>,
leftShift = true,
leftAlt = <unset>,
leftGui = <unset>,
rightControl = <unset>,
rightShift = <unset>,
rightAlt = <unset>,
rightGui = <unset>
}
}
(vim.vm.UsbScanCodeSpec.KeyEvent) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
usbHidCode = 458759,
modifiers = (vim.vm.UsbScanCodeSpec.ModifierType) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
leftControl = true,
leftShift = <unset>,
leftAlt = <unset>,
leftGui = <unset>,
rightControl = <unset>,
rightShift = <unset>,
rightAlt = <unset>,
rightGui = <unset>
}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file send_keys_to_vm-1.1.1.tar.gz.
File metadata
- Download URL: send_keys_to_vm-1.1.1.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80b00ed91e9025af7444086172911c52b4ca969a8c53ca7a711050bb613d6dd2
|
|
| MD5 |
8aa51ccfe091ecd18ce4174f6d67f5c6
|
|
| BLAKE2b-256 |
d9a7245bf2abf3ca9d6bddaf54e97255784aff2832f77327bef04cc16565a0fc
|
Provenance
The following attestation bundles were made for send_keys_to_vm-1.1.1.tar.gz:
Publisher:
publish.yaml on ellieayla/send-keys-to-vm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
send_keys_to_vm-1.1.1.tar.gz -
Subject digest:
80b00ed91e9025af7444086172911c52b4ca969a8c53ca7a711050bb613d6dd2 - Sigstore transparency entry: 1047566565
- Sigstore integration time:
-
Permalink:
ellieayla/send-keys-to-vm@bf41dbe4f344f1a7c9c34f839ccefde47b338468 -
Branch / Tag:
refs/tags/v1.1.1 - Owner: https://github.com/ellieayla
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@bf41dbe4f344f1a7c9c34f839ccefde47b338468 -
Trigger Event:
push
-
Statement type:
File details
Details for the file send_keys_to_vm-1.1.1-py3-none-any.whl.
File metadata
- Download URL: send_keys_to_vm-1.1.1-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
340efc59653774c6dc61b2aca3a9039e657916c74df1f49d1e97b48370acb8e5
|
|
| MD5 |
ad8b60413b46e810fdbd95506b84a7c1
|
|
| BLAKE2b-256 |
dc0d4a9f304c06473a62c33ee175fc86c71d32f518f3a4ca7938d8a4cc40ba05
|
Provenance
The following attestation bundles were made for send_keys_to_vm-1.1.1-py3-none-any.whl:
Publisher:
publish.yaml on ellieayla/send-keys-to-vm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
send_keys_to_vm-1.1.1-py3-none-any.whl -
Subject digest:
340efc59653774c6dc61b2aca3a9039e657916c74df1f49d1e97b48370acb8e5 - Sigstore transparency entry: 1047566613
- Sigstore integration time:
-
Permalink:
ellieayla/send-keys-to-vm@bf41dbe4f344f1a7c9c34f839ccefde47b338468 -
Branch / Tag:
refs/tags/v1.1.1 - Owner: https://github.com/ellieayla
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@bf41dbe4f344f1a7c9c34f839ccefde47b338468 -
Trigger Event:
push
-
Statement type: