I hereby claim:
- I am j178 on github.
- I am j178 (https://keybase.io/j178) on keybase.
- I have a public key ASDwwkUUC1UvGUF2DjZudNwJTDU-SrydNVpaIk4AudKdrQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python3 | |
import base64 | |
import random | |
import re | |
import string | |
import requests | |
sess = requests.Session() | |
randstr = lambda len=5: ''.join(random.choice(string.ascii_lowercase) for _ in range(len)) |
#!/usr/bin/env python3 | |
import re | |
import requests | |
import base64 | |
sess = requests.Session() | |
target = 'http://localhost/discuzx/' | |
# login target site first, and copy the cookie here |
CHARS = b'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' | |
NUMS = [62, 0, 0, 0, 63, | |
*range(52, 62), | |
0, 0, 0, 0, 0, 0, 0, | |
*range(26), | |
0, 0, 0, 0, 0, 0, | |
*range(26, 52)] | |
def to_val(c): |
from string import whitespace | |
import timeit | |
def strip(string, chars=whitespace): | |
if not isinstance(string, (str, bytes)) \ | |
or not isinstance(chars, type(string)): | |
raise ValueError | |
left = 0 | |
for left, s in enumerate(string): |