SHOW:
|
|
- or go back to the newest paste.
1 | function post(method, args, times = 1) { | |
2 | ||
3 | - | method = 'data={"method":"' + method + '","args":{' + args.replace(/\b[a-zA-Z_][a-zA-Z0-9_]+\b/g, '"$&"') + '},"uniqueSid":"' + uniqueSid + '"}'; |
3 | + | method = 'data={"method":"' + method + '","args":{' + args.replace(/\b[a-zA-Z][a-zA-Z0-9]+\b/g, '"$&"') + '},"uniqueSid":"' + uniqueSid + '"}'; |
4 | ||
5 | for (var index = 0; index < times; index++) { | |
6 | ||
7 | var poster = new XMLHttpRequest(); | |
8 | ||
9 | poster.open('POST', 'http://faptitans.com/api/', false); | |
10 | ||
11 | poster.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); | |
12 | ||
13 | poster.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); | |
14 | ||
15 | poster.setRequestHeader('X-CSRFToken', document.cookie.split('csrftoken=')[1].split(';')[0]); | |
16 | ||
17 | poster.send(method); console.log(method); console.log(poster.responseText); } | |
18 | ||
19 | } | |
20 | ||
21 | - | runLoop = async () => |
21 | + | post("heroes.buy","_id:100530,level:1"); |