-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get headers #12
Labels
enhancement
New feature or request
Comments
https://ipapi.co/json/ (1500 per day) https://stackoverflow.com/questions/391979/how-to-get-clients-ip-address-using-javascript |
abrahamjuliot
changed the title
Collect and Return Headers as a seperate fingerprint
Get IP address
Jul 26, 2020
concept: https://es6console.com/kd43wbdh/ (async function() {
const api = 'https://api6.ipify.org/?format=json'
const res = await fetch(api)
const data = await res.json()
console.log(data)
})() https://es6console.com/kd8bnj7k/ const getHeaders = async () => {
const promiseUndefined = new Promise(resolve => resolve(undefined))
try {
const api = 'https://www.cloudflare.com/cdn-cgi/trace'
const res = await fetch(api)
const text = await res.text()
const lines = text.match(/^(?:ip|uag|loc|tls)=(.*)$/igm)
const data = {}
lines.forEach(line => {
const key = line.split('=')[0]
const value = line.substr(line.indexOf('=') + 1)
data[key] = value
})
return data
}
catch (error) {
}
}
(async function() {
const headers = await getHeaders()
console.log(headers)
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://developers.google.com/apps-script/reference/url-fetch/url-fetch-app
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
The text was updated successfully, but these errors were encountered: