Search the Community
Showing results for tags 'shifing'.
Let's see if I can adequately describe what I need help with here. I'm trying to shift the lines of a txt file do meet my required output. I'm trying to create a list of numbers to brute force a lock (that I own). This lock will ignore everything leading up to the correct pin. for example, if the pin is 1234 and enter 46541198751234 and it will unlock. In my research, I have discovered the De Bruijn sequence (https://en.wikipedia.org/wiki/De_Bruijn_sequence) which will allow me to quickly go through all possible PINs in a very efficient manner without having to enter each option individually. The problem is that as a weak brute force protection they lock allows for almost 40 keys to be pressed before it times out for 30 seconds. I have split the De Bruijn sequence down into 40 character lines, but to ensure that I do not miss any of the 4 digit pins I need to use the last 3 of the previous line at the start of the next. This also means that I have to cut 3 from the end of the line to stay within the 40 character limit. For example, if my file has the following list of numbers... 00000000000000000000 11111111111111111111 22222222222222222222 33333333333333333333 ... I would need to re-arrange them as follows 00000000000000000000 <- first line is untouched, but the last 3 numbers are used at the start of the next line 00011111111111111111 <- the last 3 of the previous line are added to the start of this one, but to make room 3 character are automatically bumped to the next line 11111122222222222222 <- and the process would need to continue until the end of the 100 or so lines 11111111122222222222 11111111111122222222 11111111111111122222 11111111111111111122 12222222222222222222 22223333333333333333 The also means that new lines would be added to the end of the list to accommodate the continually growing shift. Any clues on how to accomplish this?