Okay so I have a challenge for you Java programmers out there;
Try finding out the correct key and write a key generator for it. Sorry if this is expert-level stuff. ;)
Please use the spoiler bbcode.
I'll be trying to make more challenges like this and give people points based on how they do / explain how they managed to get the correct key.
Jar download: https://www112.zippyshare.com/v/oVE1lm8x/file.html
You can run this with: java -jar TryMe.jar YOUR_KEY
Note: you cannot change the kl variable, that would be considered cheating.
Points:
@MagnificentSpam - 10 (+5 for using a different language)
Code:
package com.xrabbitgaming.tryme;
public class Main
{
static int kl = 9001;
public static void main(String[] args)
{
if (args.length == 1)
{
int sum = 0;
for (int i = 0; i < args[0].length(); i++)
sum += (int) args[0].charAt(i);
if (sum == kl)
System.out.println("Correct key! Now write me a key generator for it.");
else
System.out.println("Wrong key! I'm sure you tried your best.");
}
else
{
System.out.println("You should probably input your key as an argument.");
}
System.exit(0);
}
}
Try finding out the correct key and write a key generator for it. Sorry if this is expert-level stuff. ;)
Please use the spoiler bbcode.
I'll be trying to make more challenges like this and give people points based on how they do / explain how they managed to get the correct key.
Jar download: https://www112.zippyshare.com/v/oVE1lm8x/file.html
You can run this with: java -jar TryMe.jar YOUR_KEY
Note: you cannot change the kl variable, that would be considered cheating.
Points:
@MagnificentSpam - 10 (+5 for using a different language)
Last edited: