Skip to content

Commit

Permalink
badusb fortnite
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyclenerd committed May 4, 2024
1 parent 3a988c0 commit ce3f1d7
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions badusb_fortnite.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/perl

# Creates a BadUSB scipt to simulate keyboard operation for Fortnite with Flipper Zero
#
# perl badusb_fornite.pl > fornite.txt
#
# https://developer.flipper.net/flipperzero/doxygen/badusb_file_format.html

use strict;

my @keys = ('CONTROL', 'SPACE', 'STRING f', 'STRING 1', 'STRING 2', 'STRING 3', 'STRING 4', 'STRING 5');
my $key_count = $#keys;
my $min_ms = 3 * 60 * 1000;
my $max_ms = 5 * 60 * 1000;

foreach my $key (@keys) {
print "DELAY 2000\n";
print "$key\n";
}

foreach my $i (0..1000) {
my $random_ms = $min_ms + int(rand($max_ms - $min_ms));
# Delay value in ms
print "DELAY $random_ms\n";
my $random_key = $keys[int(rand($key_count))];
print "$random_key\n";
}

0 comments on commit ce3f1d7

Please sign in to comment.