Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (async function() {
- var cl = Array.from(document.getElementsByName("countryCodes[]")[0].options).map(v => v.value);
- var a=[];
- console.log(cl);
- for (var cn of cl) {
- r = await fetch("https://www.ip2location.com/free/visitor-blocker", {
- "headers": {
- "content-type": "application/x-www-form-urlencoded",
- },
- "referrer": "https://www.ip2location.com/free/visitor-blocker",
- "body": `countryCodes%5B%5D=${cn}&version=4&format=peer-guardian-2&emailAddress=`,
- "method": "POST",
- "mode": "cors"
- });
- var d = await r.text();
- var m=[...d.matchAll(/^(.+):(\d+\.\d+\.\d+\.\d+)-(\d+\.\d+\.\d+\.\d+)$/gim)];
- for (var x of m)
- a.push ([x[2],x[3],cn,x[1]].join("\t"));
- console.log(cn);
- }
- window.list1=a.join("\n");//document.body.innerHTML="<pre>"+a.join("\n")+"</pre>";
- console.log('done');
- download('ip2location-cc.txt',a.join("\n"));
- })()
- function download(b,c){var a=document.createElement("a");a.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(c));a.setAttribute("download",b);a.style.display="none";document.body.appendChild(a);a.click();document.body.removeChild(a)};
- /*
- https://lite.ip2location.com/ip-address-ranges-by-country
- https://lite.ip2location.com/austria-ip-address-ranges
- https://www.ip2location.com/free/visitor-blocker
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement