Skip to content

Instantly share code, notes, and snippets.

@antiops
Last active September 1, 2020 11:51
Show Gist options
  • Save antiops/36b17460e14e86d479534813def4685b to your computer and use it in GitHub Desktop.
Save antiops/36b17460e14e86d479534813def4685b to your computer and use it in GitHub Desktop.
Dump free proxies from proxyrack.com api
/*
* Paste this in the dev tools console while on any webpage on https://www.proxyrack.com
*
* Grabs the total amount of proxies availble on the site
* via their api and outputs all the dead/live proxies in a comma seperated list
* -- (38216 total proxies as of writing) Alive: 20692, Dead: 17523
*/
(async () => {
let alive = [], dead = []
try {
const getTotalAmnt = async () => {
const fetchTotals = await fetch('/proxyfinder/proxies.json?page=1&perPage=1&offset=0')
const viewTotals = await fetchTotals.json()
return viewTotals.totalRecordCount
}
const getAllData = async () => {
const totals = getTotalAmnt()
console.log('\x1b[37m[\x1b[32mFetching Data...\x1b[37m]')
const fetchApi = await fetch(`/proxyfinder/proxies.json?page=1&perPage=${totals}&offset=0`)
const proxyData = await fetchApi.json()
for (var i = 1; i < proxyData.records.length; i++) {
const col = proxyData.records[i]
if (col.online === "No") {
dead.push(`${col.ip}:${col.port}`)
} else {
alive.push(`${col.ip}:${col.port}`)
}
}
console.log(`[\x1b[32mTotal Amount of Proxies\x1b[37m]: ${proxyData.records.length}\n[\x1b[32mAlive Total\x1b[37m]: ${alive.length}\n[\x1b[32mDead Total\x1b[37m]: ${dead.length}`)
console.log(`Alive List: ${alive}\n\n\n\nDead List: ${dead}`)
}
getAllData()
} catch (err) {
console.log(err)
}
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment