Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const fetch = require("node-fetch");
- var fs = require("fs");
- var link = /\b(?:https|http):\/\/(?:.)+?\.(?:com|org|net)\b/g;
- var vid = /watch\?v\=[^ \n"]*/g;
- var hma = /\b\w{6}\-\w{6}\-\w{6}/g;
- var result = "";
- var keylist = [];
- var linklist = [];
- var linklistvalid = [];
- function crawl(){
- fetch("https://google-search3.p.rapidapi.com/api/v1/search/q=hma+vpn+key&num=100", {
- "method": "GET",
- "headers": {
- "x-rapidapi-key": "priv",
- "x-rapidapi-host": "google-search3.p.rapidapi.com"
- }
- })
- .then(res => res.json())
- .then(json => {
- console.log("Done");
- result += json.results;
- })
- .catch(e =>{
- })
- }
- async function main(){
- await fetch("https://google-search3.p.rapidapi.com/api/v1/search/q=V87R4M-QEEQB2-5S48WE&num=100", {
- "method": "GET",
- "headers": {
- "x-rapidapi-key": "priv",
- "x-rapidapi-host": "google-search3.p.rapidapi.com"
- }
- })
- .then(res => res.json())
- .then(json => {
- console.log("Done");
- result = json.results;
- })
- .catch(e => {
- })
- await result.forEach(subobject => {
- var link = subobject.link;
- var description = subobject.description;
- var desckey = description.match(hma);
- if(desckey != null) keylist.push(...desckey);
- console.log(link);
- linklist.push(link);
- //console.log("Done");
- });
- for(var link in linklist){
- await console.log(linklist[link]);
- await fetch(linklist[link])
- .then(res => res.text())
- .then(body => {
- var key = body.match(hma);
- console.log(key);
- if(key != null) keylist.push(...key);
- })
- .catch(e => {
- })
- }
- for(var valid in keylist){
- if(keylist[valid].match(/[0-9]/g) != null) linklistvalid.push(keylist[valid]);
- }
- linklistvalid.forEach(key => {
- console.log(key);
- fs.appendFileSync("keys.txt", "\n"+key);
- });
- }
- main();
Add Comment
Please, Sign In to add comment