Skip to content

Instantly share code, notes, and snippets.

@m0rb
Created June 19, 2020 21:24
Show Gist options
  • Select an option

  • Save m0rb/8518b01dc25e047d93f68e158d2fbcb1 to your computer and use it in GitHub Desktop.

Select an option

Save m0rb/8518b01dc25e047d93f68e158d2fbcb1 to your computer and use it in GitHub Desktop.
#!/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