Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 实现 #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Python 实现 #2

wants to merge 1 commit into from

Conversation

hanhuizhu
Copy link

import time
import hashlib

def encrypt():
    now = int(time.time())
    now_16 = (hex(now)+'').upper()[2:]
    m2 = hashlib.md5()
    m2.update(str(now))
    now_16_md5 = m2.hexdigest().upper()
    if(len(now_16) == 8):
        s = now_16_md5[0:5]
        o = now_16_md5[-5:]
        n = ""
        l = ""
        for i in range(5):
            n += s[i] + now_16[i]
            l += now_16[i + 3] + o[i]
        print({
            'as': "A1" + n + now_16[-3:],
            'cp': now_16[0: 3] + l + "E1"
        })
        return{
            'as': "A1" + n + now_16[-3:],
            'cp': now_16[0: 3] + l + "E1"
        }
encrypt()

@a252937166
Copy link
Owner

@hanhuizhu 不能把dev1.0的提到master,两个分支针对的是两个不同的头条号

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants