Now I know that just putting an array with 16 digits is too much for arrays and it will give an answer but for a cybersecurity class I wish to gain access to routers around my neighborhood.
I won’t mess with them but I serve to prove a point and all the routers are the same thanks to living in the middle of nowhere. They are 16 digits long.
So can anyone help me solve how I would get 16 digits together and create it all in a txt file?
What I want to do is create a new file, and then make things that would make it so that it is a dictionary-type in that it has every number of 0000000000000000 -> 9999999999999999.
The creating of the file is no problem for me, but how would I create this dictionary of numbers with a 16 number sequence?
Edit: I thought about splitting it up into 4 4 digit things but I am unsure how I would make sure that they are a) not the same number as before and b), make a space after the sixteenth digit is in.
First, your number (99…9) has 16 digits. In term of data type in Java, it about 53 bit (<64 bit so far) so it is an
longBut, assume that each number is 64 bit.
So the file size could be size = (99..99) (number) * 64 (bit per number) = 73k Tera Byte (impossible to store in a text file in normal way!)
So you should consider another way (?)
Furthermore, you can not declarelong l = 999999999999999; because the compiler got the error (integer number to large), but this works:long l = Long.parseLong("9999999999999999");Hope this can help you !
Edit: Declare by
long l = 9999999999999999999l;(lcan be both upper and lower case, thanks @Tom)