Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PsycoStea/Pi-Zero-2W-Bad-USB
/ functions
Functions
76 in github.com/PsycoStea/Pi-Zero-2W-Bad-USB
⨍
Functions
76
◇
Types & classes
14
↓ 22 callers
Function
_run
(text: str)
tests/test_parser.py:49
↓ 13 callers
Function
safe_eval_math
Evaluate a numeric expression in a sandboxed way (no names, no calls).
run_payload.py:87
↓ 11 callers
Function
evaluate_condition
Evaluate ``<lhs> <op> <rhs>`` with original case preserved for strings.
run_payload.py:145
↓ 6 callers
Method
write_report
(self, report: bytes)
run_payload.py:59
↓ 5 callers
Function
send_hid
(engine: HIDEngine, mod: int, key: int, release: bool = True)
run_payload.py:209
↓ 5 callers
Function
type_string
( engine: HIDEngine, text: str, keys: Dict[str, Tuple[int, int]], modifiers: Dict[str, int],
run_payload.py:216
↓ 4 callers
Function
_env_float
(name: str, default: float)
monitor_and_run.py:38
↓ 4 callers
Function
force_rebind
Bind the gadget back to the UDC controller.
monitor_and_run.py:140
↓ 4 callers
Function
force_unbind
Unbind the gadget from the UDC (equivalent to physical disconnect).
monitor_and_run.py:132
↓ 3 callers
Function
_collect_block
Return (content_lines, end_pc_at_closer). Raises ValueError if unmatched.
run_payload.py:309
↓ 3 callers
Function
_safe_write
(path: str, value: str)
run_payload.py:177
↓ 3 callers
Function
parse_number
(val)
run_payload.py:101
↓ 3 callers
Function
substitute_vars
(text: str, variables: Dict[str, object])
run_payload.py:117
↓ 2 callers
Function
_unquote
(s: str)
run_payload.py:138
↓ 2 callers
Function
_write_udc
Write to the gadget's UDC file via the os.write syscall. Going through ``open(...).write("")`` does not actually invoke ``write(2)`` with zer
monitor_and_run.py:110
↓ 2 callers
Method
close
(self)
run_payload.py:63
↓ 2 callers
Function
led_on
()
run_payload.py:189
↓ 2 callers
Function
load_layout
Return ``(MODIFIERS, KEYS)`` for the named layout, e.g. ``"us"`` or ``"uk"``.
keymaps/__init__.py:17
↓ 2 callers
Method
open
(self)
run_payload.py:56
↓ 2 callers
Function
read_udc_state
(udc: str)
monitor_and_run.py:97
↓ 2 callers
Function
run_ducky
(filename: str, engine: Optional[HIDEngine] = None)
run_payload.py:288
↓ 1 callers
Function
_env_int
(name: str, default: int)
monitor_and_run.py:51
↓ 1 callers
Function
_new_state
(engine: HIDEngine)
run_payload.py:262
↓ 1 callers
Function
_switch_layout
(state: dict, layout_name: str)
run_payload.py:277
↓ 1 callers
Function
configure_logging
()
monitor_and_run.py:77
↓ 1 callers
Function
find_udc
(retries: int = 30, delay: float = 1.0)
monitor_and_run.py:85
↓ 1 callers
Function
led_blink
(pattern, end_on: bool = True)
run_payload.py:197
↓ 1 callers
Function
led_off
()
run_payload.py:193
↓ 1 callers
Function
led_setup
()
run_payload.py:185
↓ 1 callers
Function
main
(argv: List[str])
run_payload.py:648
↓ 1 callers
Function
main
()
monitor_and_run.py:148
↓ 1 callers
Function
press_combo
( engine: HIDEngine, tokens: List[str], keys: Dict[str, Tuple[int, int]], modifiers: Dict[str,
run_payload.py:242
↓ 1 callers
Function
process_lines
(lines: List[str], state: dict)
run_payload.py:327
↓ 1 callers
Function
substitute_defines
(line: str, defines: Dict[str, str])
run_payload.py:126
↓ 1 callers
Function
wait_for_configured
(udc: str)
monitor_and_run.py:105
Method
__init__
(self, path: str = HID_DEVICE)
run_payload.py:52
Method
__init__
(self)
tests/test_parser.py:30
Method
close
(self)
tests/test_parser.py:39
Method
key_reports
All non-empty (i.e. not key-release) reports.
tests/test_parser.py:44
Method
open
(self)
tests/test_parser.py:33
Function
repl
(match: "re.Match[str]")
run_payload.py:118
Method
test_basic
(self)
tests/test_parser.py:63
Method
test_ctrl_alt_del
(self)
tests/test_parser.py:343
Method
test_delay_no_crash
(self)
tests/test_parser.py:352
Method
test_float
(self)
tests/test_parser.py:76
Method
test_hold_shift_capitalizes
(self)
tests/test_parser.py:269
Method
test_if_false_runs_else_branch
(self)
tests/test_parser.py:167
Method
test_if_true_runs_then_branch
(self)
tests/test_parser.py:152
Method
test_inject_mod_applies_to_next_string
(self)
tests/test_parser.py:245
Method
test_inject_mod_zero_releases
(self)
tests/test_parser.py:255
Method
test_numeric
(self)
tests/test_parser.py:98
Method
test_parens
(self)
tests/test_parser.py:69
Method
test_random_bogus_no_keystrokes
(self)
tests/test_parser.py:236
Method
test_random_letter_count
(self)
tests/test_parser.py:224
Method
test_random_number_only_digits
(self)
tests/test_parser.py:229
Method
test_rejects_attribute
(self)
tests/test_parser.py:83
Method
test_rejects_call
(self)
tests/test_parser.py:87
Method
test_rejects_name
(self)
tests/test_parser.py:79
Method
test_rejects_string_constant
(self)
tests/test_parser.py:91
Method
test_string_block_joins
(self)
tests/test_parser.py:318
Method
test_string_compare_case_sensitive
(self)
tests/test_parser.py:180
Method
test_string_inequality
(self)
tests/test_parser.py:114
Method
test_string_literals_preserve_case
(self)
tests/test_parser.py:108
Method
test_stringln_block_emits_enter_per_line
(self)
tests/test_parser.py:329
Method
test_uk_at_uses_shift_apostrophe
(self)
tests/test_parser.py:289
Method
test_uk_double_quote_uses_shift_2
(self)
tests/test_parser.py:298
Method
test_unary
(self)
tests/test_parser.py:72
Method
test_unknown_layout_keeps_default
(self)
tests/test_parser.py:307
Method
test_us_at_uses_shift_2
(self)
tests/test_parser.py:283
Method
test_var_assignment_and_use
(self)
tests/test_parser.py:120
Method
test_var_compound_assignment
(self)
tests/test_parser.py:130
Method
test_var_string_literal
(self)
tests/test_parser.py:140
Method
test_while_counts
(self)
tests/test_parser.py:197
Method
test_while_le_terminates
(self)
tests/test_parser.py:209
Method
test_with_variables
(self)
tests/test_parser.py:104
Method
write_report
(self, report: bytes)
tests/test_parser.py:36