Skip to content

Instantly share code, notes, and snippets.

@braindeaf
Created March 28, 2016 11:57
Show Gist options
  • Save braindeaf/3eb80f862215f8188dcd to your computer and use it in GitHub Desktop.
Save braindeaf/3eb80f862215f8188dcd to your computer and use it in GitHub Desktop.
Faraday HTTP Request with different source IP
conn = Faraday.new(url: 'http://www.bunyons.com')
conn.post do |req|
req.url '/dave/onion'
req.headers['Referer'] = 'http://www.something.com'
req.headers['User-Agent'] = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36"
req.headers['X-Forwarded-For'] = '86.185.170.5'
req.headers['X-Requested-With'] = 'XMLHttpRequest'
req.body = { plasticpantsid: 2403, arbitudeabuthnot: 'faff' }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment