Skip to content

Instantly share code, notes, and snippets.

@racterub
Last active August 6, 2020 03:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save racterub/50ba87e2ca609217c8e06b590e6807cf to your computer and use it in GitHub Desktop.
Save racterub/50ba87e2ca609217c8e06b590e6807cf to your computer and use it in GitHub Desktop.
def gen_token(uid):
import datetime
import base64
payload = ['Y', 'Z']
time = datetime.date.today()
tmp = str(time.year) + '/' + str(time.month).rjust(2, '0') +'/' + str(time.day).rjust(2, '0')
payload += list(tmp) + list('s' + str(uid))
return 'https://portalx.yzu.edu.tw/PortalSocialVB/FMain/PostWall.aspx?Menu=User&UserAccount=' + base64.b64encode(('\x00'.join(payload) + '\x00').encode()).decode()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment