Created
June 19, 2020 21:24
-
-
Save m0rb/8518b01dc25e047d93f68e158d2fbcb1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/perl | |
| # System Shock 2 keypad bruteforcer by morb (@m0rb on github/twitter) | |
| # Circa 12/15/17 | |
| use warnings; | |
| use X11::GUITest qw/:ALL/; | |
| use Data::Dumper; | |
| my @args = 10000..99999; | |
| my @win = FindWindowLike 'System Shock' or die 'nope'; | |
| RaiseWindow(@win) or die; | |
| SetInputFocus(@win) or die; | |
| SendKeys('{TAB}'); | |
| ClickMouseButton M_RIGHT; | |
| foreach my $test (@args) { | |
| my $what = sprintf("%05s", $test); | |
| SendKeys($what); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment