Another Puzzle (This time with a prize!)

After the puzzle I posted a couple days ago, I got some requests to make a new one, but to avoid posting the solutions. I wrote up a quick password script in Python for you guys to crack. It is 19 lines long and located here. To download it without looking at the script, copy and paste this line into your terminal.

curl https://gist.githubusercontent.com/moezsayani/cddafdd3c947e79b50603d7ef7dd2632/raw/751cee2fd29596f04cc59faec09e3b1766867c4c/puzzle2.py > puzzle2.py

Instructions:

Find the password. The program expects to be called in the terminal with your guess at the password following it. It should look like

python puzzle2.py passwordguess

 

Trivial Solution:

There are at least 2 ways to crack the password, so I’m going to tell you the easiest solution. The script itself is 19 lines long. If you look at one of the functions, it decrypts a list of integers to compare to the input. Adding a single line to the code can get it to print the password before running the compare operation.

The Prize:

The first person to send me the password will receive a $10 gift card to Amazon or Starbucks. You must tell me EXACTLY how you got the password. Screenshots of your process will help.

HINT: 

This is an IDLE task I came up with while at work.

 

SOLVED!

Congrats to Charles, who solved it using the Python debugger.

19988718_1750977914927350_1009184181_n[1]

Here’s his explanation – “Initially I approached the problem by viewing the source code and noticed that the password is being decrypted in a for loop. After the for loop is traversed the password can just be printed out in the else statement. However, the password can also be cracked without modifying the source code. By stepping through the program line by line in the python debugger, you can simply print the value of the ‘password’ variable after the for loop is run.”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s