Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help ><
#1
im very new to python.

im trying to do a challenge.
there is that script that encrypts.

def GGGGotate(lol):
    bit = lol << 1
    movebit = bit & 255
    if (lol > 127 ):
        movebit = movebit | 1
    return (movebit)
def main():
    value = input("Enter your value: ")
    ListMoveBit = []
    Index_Move_bit = 1
    Index_Value = 0
    ORD_value = []
    ORD_key = []
    Under_10 = []
    Index_star = 0
    Final_encrypted = ""
    Passs = []
    List_values_back = []
    Uncrypt = []
    for i in value:
        ORD_value.append(ord(i))
    a = ord("a")
    ORD_key.append(a)
    lol = int(ORD_key[0]) ^ int(ORD_value[0])
    ListMoveBit.append(GGGGotate(lol))
    for chars in ORD_value:
        if Index_Value == 0:
            Index_Value += 1
            pass
        else:
            lol = int(ListMoveBit[Index_Value-1]) ^ int(chars)
            ListMoveBit.append(GGGGotate(lol))
            Index_Value += 1
    for i in ListMoveBit:
        Under_10.append("0")
    for i in ListMoveBit:
        if (i < 9):
            Under_10[Index_star] = "1"
        Index_star += 1
    for i in ListMoveBit:
        x = hex(i)
        val = x[2:]
        if(i > 9) and (i < 16):
            Final_encrypted = Final_encrypted + "0" + val
        else:
            if (i<10):
                Final_encrypted = Final_encrypted +"0"+val
            else:
                Final_encrypted = Final_encrypted + val
    print("\nThe encrypted message is:")
    print(Final_encrypted + "\n")
if __name__ == '__main__':
    main()
it encrypted this 2e84cb5f6c34b0a38fcdf99749
i need to reverse it.
can someone give me a fast example to how to do it?
Reply
#2
Use a backward stepping slice (if I understand the question correctly)
Final_encrypted = Final_encrypted[::-1]
Reply
#3
(Jul-28-2020, 08:00 PM)jefsummers Wrote: Use a backward stepping slice (if I understand the question correctly)
Final_encrypted = Final_encrypted[::-1]

do i need to add this or just replace?

i believe i need to decrypt it, by reversing this script.

i tried playing with this::-1
got few random results

but i think im missing something else

if i understood the challenge hint, the answer suppose to be 256 hash after decrypt
an blockchain hash
Reply
#4
Do you understand what the code does? Is this supposed to be an easy challenge?
Reply
#5
its hardest


When you search the computer further, you find an interesting Python script that seems to encode data. Can you decrypt the message?

2e84cb5f6c34b0a38fcdf99749

im only startting to learn python tho...>.<
Reply
#6
I don't think your knowledge of Python matters much, if at all. This is a logic puzzle, not a programming challenge.
Reply


Forum Jump:

User Panel Messages

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