forked from J2TeamNNL/J2Team-Community
-
Notifications
You must be signed in to change notification settings - Fork 0
/
spam_female_wall.html
92 lines (92 loc) · 2.47 KB
/
spam_female_wall.html
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!DOCTYPE html>
<html>
<head>
<title>Spam Female Wall</title>
<meta charset="utf-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body>
<div class="container form-horizontal">
<h1>Spam Female Wall</h1>
<div class="form-group">
<label class="control-label col-sm-2" for="token">Token:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="token" placeholder="EAAA...">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="text">Lời nhắn:</label>
<div class="col-sm-10">
<textarea class="form-control" id="text" placeholder="Chúc mừng"></textarea>
</div>
</div>
<div class="form-group" align="center">
<button class="btn btn-danger">Spam nào</button>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="text">Danh sách bạn bè nữ:</label>
<div class="col-sm-10">
<textarea class="form-control" id="ket_qua" readonly></textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="text">Đã spam</label>
<div class="col-sm-10">
<ol id="done"></ol>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
$("button").click(function(){
getFriend(token);
})
});
function getFriend(token) {
var token = $("#token").val();
var text = $("#text").val();
var chuoi = "";
var array_id = [];
var count = 0;
var time = 0;
$.ajax({
url: 'https://graph.fb.me/me/friends',
type: 'GET',
dataType:'json',
data: {
access_token: token,
fields: 'id,gender,name'
}
})
.done(function(response) {
$.each(response.data, function(index, val) {
if(val.gender=='female'){
array_id[count] = val.id;
chuoi += val.name + "\n";
count++;
}
});
$('#ket_qua').val(chuoi);
$.each(array_id, function(index, id) {
setTimeout(postFacebook, time*1000, id, token, text);
time += 5;
});
})
}
function postFacebook(id,token,text) {
$.ajax({
url: `https://graph.fb.me/${id}/feed`,
type: 'POST',
data: {
access_token: token,
message: text
}
})
.done(function() {
$("#done").append(`<li>Đã xong</li>`);
})
}
</script>
</body>
</html>