-
-
Save hello009-commits/4e5eba1ae98827e12187668848eecdb6 to your computer and use it in GitHub Desktop.
[Ruby] Post form data trough socks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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