Python Forum
How i Can Reverse This Code To get the key
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How i Can Reverse This Code To get the key
#3
All the steps can be reversed, even the exclusive or (^ 0xb). If you invert everything and perform the steps in reverse order you can find the starting string. I wrote an rbig() and tested if rbig(big(str)) == str. I did the same for bang(). Of the two, I found bang() easier to reverse, so maybe start with that.

The first thing I did was write a comment to describe each step. For example, this removes that last character, swaps the case of the remaining characters, then inserts the old trailing character as the first character.
enc[-1] + enc[:-1].swapcase()
The reverse would be remove the first character, swap all the remaining characters, then append the old leading character as the last character.

The starting string looks like gibberish, so if you get a gibberish result from your code breaking don't assume it must be wrong. Test your results by running through the check.
rob101 and rachhost like this post
Reply


Messages In This Thread
RE: How i Can Reverse This Code To get the key - by deanhystad - Aug-08-2022, 07:24 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020