Is there any easy way to reverse this hash function?

Hoe Miller

I've got the following python method, it gets a string and returns an integer. I'm looking for the correct input that will print "Great Success!"

input = "XXX"
def enc(pwd):
    inc = 0
    for i in range(1, len(pwd) + 1):
        _1337 = pwd[i - 1]
        _move = ord(_1337) - 47
        if i == 1:
            inc += _move
        else:
            inc += _move * (42 ** (i - 1))
    return inc

if hex(enc(input)) == 0xEA9D1ED352B8:
    print "Great Success!"
Paul Hankin

It's encoding the input in base 42 (starting from chr(47) which is '/'), and easy to decode:

def dec(x):
    while x:
        yield chr(47 + x % 42)
        x //= 42

print ''.join(dec(0xEA9D1ED352B8))

The output is: ?O95PIVII

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Any easy-to-use hash function in Win32 to hash an ASCII string?

From Dev

Is there any easy way to see what exceptions a Kotlin function throws?

From Dev

is there any easy way to convert output of the type() function in python to string?

From Dev

VLSM: Any easy way to learn it

From Dev

What's an easy way to get a reverse shell?

From Dev

Reverse the way of function output

From Dev

Any Excel function that will reverse a string?

From Dev

Is there any easy way to create oracle partitions

From Dev

Is there any easy way to compare list items in python?

From Dev

Is there any easy way to create oracle partitions

From Dev

Is there a way to reverse the processing of a specific function?

From Dev

Is there any way to reverse the order of bits in matlab

From Dev

Is there an easy way to get a git reverse log starting from a given commit?

From Dev

Pygame: Is there any easy way to find the letter/number of ANY alphanumeric pressed?

From Dev

Pygame: Is there any easy way to find the letter/number of ANY alphanumeric pressed?

From Dev

Is there any easy, readable way to parse a table Python in a functional way?

From Dev

Easy way to extract key-value from hash

From Dev

Is there an easy way to combine strings as function parameter?

From Java

Any easy way to import multiple image files at once in react

From Dev

Easy way to increment Mongoose document versions for any update queries?

From Java

Any easy way to transform a missing number sequence to its range?

From Dev

Is there any easy way to get likes of user from facebook?

From Dev

Any easy way to implement arithmetic operations for std::array and std::vector?

From Dev

Easy way to check if nested list has any entries

From Dev

Is there any easy way to merge two arrays in swift along with removing duplicates?

From Dev

Any easy way to chain two comparison <=> operators in Ruby?

From Dev

Is there any easy way to set several bits in a row within a short or int?

From Dev

any easy way to get imagenet dataset for training custom model in tensorflow?

From Dev

Is there any easy way to add spaces on left of the first line in an edittext

Related Related

  1. 1

    Any easy-to-use hash function in Win32 to hash an ASCII string?

  2. 2

    Is there any easy way to see what exceptions a Kotlin function throws?

  3. 3

    is there any easy way to convert output of the type() function in python to string?

  4. 4

    VLSM: Any easy way to learn it

  5. 5

    What's an easy way to get a reverse shell?

  6. 6

    Reverse the way of function output

  7. 7

    Any Excel function that will reverse a string?

  8. 8

    Is there any easy way to create oracle partitions

  9. 9

    Is there any easy way to compare list items in python?

  10. 10

    Is there any easy way to create oracle partitions

  11. 11

    Is there a way to reverse the processing of a specific function?

  12. 12

    Is there any way to reverse the order of bits in matlab

  13. 13

    Is there an easy way to get a git reverse log starting from a given commit?

  14. 14

    Pygame: Is there any easy way to find the letter/number of ANY alphanumeric pressed?

  15. 15

    Pygame: Is there any easy way to find the letter/number of ANY alphanumeric pressed?

  16. 16

    Is there any easy, readable way to parse a table Python in a functional way?

  17. 17

    Easy way to extract key-value from hash

  18. 18

    Is there an easy way to combine strings as function parameter?

  19. 19

    Any easy way to import multiple image files at once in react

  20. 20

    Easy way to increment Mongoose document versions for any update queries?

  21. 21

    Any easy way to transform a missing number sequence to its range?

  22. 22

    Is there any easy way to get likes of user from facebook?

  23. 23

    Any easy way to implement arithmetic operations for std::array and std::vector?

  24. 24

    Easy way to check if nested list has any entries

  25. 25

    Is there any easy way to merge two arrays in swift along with removing duplicates?

  26. 26

    Any easy way to chain two comparison <=> operators in Ruby?

  27. 27

    Is there any easy way to set several bits in a row within a short or int?

  28. 28

    any easy way to get imagenet dataset for training custom model in tensorflow?

  29. 29

    Is there any easy way to add spaces on left of the first line in an edittext

HotTag

Archive