Stats: 3,186,779 members, 7,930,662 topics. Date: Sunday, 25 August 2024 at 02:32 AM |
Nairaland Forum / Science/Technology / Programming / Number Generator Challenge : Can You Solve This? (2496 Views)
Can You Solve PHP Problems? Let's Find Out.. / Can You Solve This Tricky Question? / Can You Solve This? (2) (3) (4)
Number Generator Challenge : Can You Solve This? by Slyr0x: 1:27pm On Mar 23, 2016 |
I have a number generator, that takes in 16 characters, and then generates a serial number. The following are the sequences generated by this number generator: Please enter a 16 character string to generate: 1234567890123456 Your Serial key is: 1751540834-1886284906-1684168818-1818912870 Please enter a 16 character string to generate 1111111111111111 Your Serial key is: 1650614882-1650614882-1650614882-1650614882 Please enter a 16 character string to generate 2222222222222222 Your Serial key is: 421075225-421075225-421075225-421075225 Please enter a 16 character string to generate 0987654321234567 Your Serial key is: 463215768-429529755-429463705-463149722 Please enter a 16 character string to generate qwertyuiopasdfgh Your Serial key is: 3838504674-884653242-3871531230-875803442 Please enter a 16 character string to generate mnbvcxzasdfghjkl Your Serial key is: 3972324570-3270832326-3469527270-909489460 Given the following sequences, what will be my 16 character string to generate the serial number "851122601-565353145-976764089-3706359006" ? |
Re: Number Generator Challenge : Can You Solve This? by talk2hb1(m): 2:42pm On Mar 23, 2016 |
Reverse Engineering, where are the Mathematicians ![]() |
Re: Number Generator Challenge : Can You Solve This? by sleepingdemon: 3:14pm On Mar 23, 2016 |
sleepingdemon:using php, i would do the following <?php $characters=1111444411111111; //check if character lengthis 16 $num_length = strlen((string)$characters); if($num_length !=16){ //throw error and probably return }else{ //divide the number into 4 sections $numbee=substr($characters, 0, 4); $num=substr($characters, 4, 4); $num2=substr($characters, 8, 4); $num3=substr($characters, 12, 4); //generate serial number $first_part=rand($numbee, ($numbee+4000000)); $second_part=rand($num, ($numbee+4000000)); $third_part=rand($num2, ($numbee+40000000)); $fourt_part=rand($num3, ($numbee+40000000)); //make all parts of the serials long $seria11=$first_part.rand(1000, 90000); $seria12=$second_part.rand(1000, 90000); $seria13=$third_part.rand(1000, 90000); $seria14=$fourt_part.rand(1000, 90000); //cut each part of it to give 10 charcters only $serial_final1=substr($seria11, 0, 10); $serial_final2=substr($seria12, 0, 10); $serial_final3=substr($seria13, 0, 10); $serial_final4=substr($seria14, 0, 10); //print out the generated serial number $final=$serial_final1.'-'.$serial_final2.'-'.$serial_final3.'-'.$serial_final4; echo $final; } ?> after all of this, be sure to replace the character variable with the source of your serial number |
Re: Number Generator Challenge : Can You Solve This? by Nobody: 4:31pm On Mar 23, 2016 |
in java gui JTextField.Text=random.Next(1,9) Random generator = new Random(); JOptionPane.showMessageDialog( generate); it Is just for me to place the button and textfield in jframe . |
Re: Number Generator Challenge : Can You Solve This? by Nobody: 4:34pm On Mar 23, 2016 |
I was able to create a serial generator in c#
|
Re: Number Generator Challenge : Can You Solve This? by Slyr0x: 5:08pm On Mar 23, 2016 |
SleepingDemon This is the question "Given the following sequences, what will be my 16 character string to generate the serial number "851122601-565353145-976764089-3706359006" ?" |
Re: Number Generator Challenge : Can You Solve This? by Slyr0x: 5:13pm On Mar 23, 2016 |
proxy20: The objective of this exercise is not to create a random generator. If putting in a 16 character string "1234567890123456", generates a serial number "1650614882-1650614882-1650614882-1650614882", what 16 character string do I have top put in, to generate "851122601-565353145-976764089-3706359006"?? Look at the other sequences to perfect your algorithm |
Re: Number Generator Challenge : Can You Solve This? by Nobody: 5:38pm On Mar 23, 2016 |
static void Main( string[] args ) { var myBase16Digits = Base16Extensions. StandardBase10 // var myBase16Digits = " 1234567890123456" // var myBase16Digits = _GenerateCustomeBase40DigitK var g = Guid.Parse ( " 1751540834-1886284906-1684168818-1818912870" ) ; Random random= new Random(); private const string _chars = "123456789"; //Added 1-9 private string RandomString(int size) { char[] buffer = new char[size]; for (int i = 0; i < size; i++) { buffer[i] = _chars[_rng.Next(_chars.Length)]; } return new string(buffer); } there must be a method to verify the key instead of generating random numbers . here is my demo code . I will put it in windows form application in c# later . |
Re: Number Generator Challenge : Can You Solve This? by ijeezlux(m): 8:38pm On Mar 23, 2016 |
provide the algorithm of how u use the 16 to get the serial number then I can reserve any serial number to its corresponding 16 digits |
Re: Number Generator Challenge : Can You Solve This? by Nobody: 4:11pm On Mar 24, 2016 |
With all due respect, I feel this challenge is so belittling...this task is an easy face wipe. Please come up with more demanding tasks, except you're trying to reach newbies or something.. Even a newbie will solve this by searching Google. |
Re: Number Generator Challenge : Can You Solve This? by SetrakusRa(m): 4:52pm On Mar 24, 2016 |
DanielTheGeek: solve it. |
Re: Number Generator Challenge : Can You Solve This? by Nmeri17: 8:21pm On Mar 26, 2016 |
mehn! mission impossible cc jacob05 chinenyen |
Re: Number Generator Challenge : Can You Solve This? by seunthomas: 10:28pm On Mar 26, 2016 |
You want to find the needle in the haystack. The key used in signing the encryption. Is this a hash or a cipher? Cos its not like a looking cipher(Are all the values correct?). I noticed you posted another question like this, are you trying to reverse engineer a software? |
Re: Number Generator Challenge : Can You Solve This? by ChinenyeN(m): 4:02am On Mar 27, 2016 |
seunthomas:My cryptography knowledge is cursory, so maybe I'm not the best person to respond to this... but (if indeed this is a cryptography problem), then I'm inclined to say that it looks very much like a hash. @Topic: If it is a number generator problem, then I'm inclined to believe that there is a cipher element to this based on the fact that the OP's examples are not limited to just integers. Also, the OP's post (or it may be better to say that the way the OP presented the problem) seems to indicate the idea of a guaranteed output. For example, the OP seems to be guaranteeing that mnbvcxzasdfghjkl will result in 3972324570-3270832326-3469527270-909489460 each time. If that's the case (and if this is a number generator problem), then the solution would have to make use of a seed. But we are not given the seed in this problem. I doubt I can solve this in any reasonable amount of time. As I said, my knowledge in this area is only cursory and for me there are a lot of unknowns. But, I am interested in seeing what others can come up with. |
Re: Number Generator Challenge : Can You Solve This? by Slyr0x: 8:35am On Mar 27, 2016 |
ChinenyeN: You are right about the output being the same every time. If I had the seed, ofcourse, it no longer becomes a challenge. This is a reverse engineering challenge, and I have uploaded the numgen software here https://www.dropbox.com/s/tttxbtql079jd9b/numgen.exe?dl=0 . It is a CLI application, so just navigate to the directory from your command prompt and run. You can also find the virus scan result here (so you can be rest assured I am not trying to infect you) https://www.virustotal.com/en/url/76f9f0d3d5a230a17b45e04eefb5d680068f6117760994728b179a2328e54588/analysis/1459063916/ Happy Reversing ![]() |
(1) (Reply)
C Programming Issues / Running Software From A Server To A Local Pc / Pls I Need A Good Hacking Teacher.
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 39 |