Skip to content

Instantly share code, notes, and snippets.

@hello009-commits
Forked from b1nary/post_tor_ruby.rb
Created July 31, 2020 10:38
Show Gist options
  • Save hello009-commits/4e5eba1ae98827e12187668848eecdb6 to your computer and use it in GitHub Desktop.
Save hello009-commits/4e5eba1ae98827e12187668848eecdb6 to your computer and use it in GitHub Desktop.
[Ruby] Post form data trough socks
require 'rubygems'
require 'rest-client'
# Socksify is amazing handling Proxys, also Socks like tor
# The proxy is simply aviable in the whole script
require 'socksify'
TCPSocket::socks_server = "127.0.0.1"
TCPSocket::socks_port = 9070
# Create a cookie
@cookie = {'name' => 'content'}
# Make a "ever" loop
while true
begin
# Request the Page. RestClient let us also use getparas as url, and post to them, AMAZING! :D
res = RestClient.post 'http://domain.tld/path/page.php?get=value', {'post_key' => 'post_value'}, :cookies => @cookie
# Print the answer
puts res.body
rescue
puts ":: Error :/"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment