This file contains 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
#!/usr/bin/ruby | |
#created by Abdullah Ibrahim "visof" | |
require 'rubygems' | |
require 'mechanize' | |
require 'uri' | |
require 'net/http' | |
agent = Mechanize.new |
This file contains 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
the \0 means a zero byte. | |
client->server: "authmethod params"\0 | |
client sends the auth method and auth method specific | |
parameters. for us, we only care if authmethod | |
is "none" and ignore the params. | |
server->client: ""\0 | |
we reply with empty string if authentification was successfull | |
(authmethod=="none") |
This file contains 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 'socket' # Get sockets from stdlib | |
server = TCPServer.open(17010) # Socket to listen on port 2000 | |
loop { # Servers run forever | |
Thread.start(server.accept) do |client| # Wait for a client to connect | |
authmethod = client.gets | |
if authmethod.strip == "none" | |
client.puts "i'm Empty String" | |
client.puts `sh` |
This file contains 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
authmethod = ARGV[0] | |
server = ARGV[1] | |
port = 17010 | |
s = TCPSocket.open(server, port) | |
if authmethod == "none" | |
s.puts "none" | |
while line = s.gets | |
puts line | |
end |
This file contains 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
respond_to do |format| | |
if verify_recaptcha(:model => @product, :notice => "error with reCAPTCHA!") | |
if @product.save | |
format.html { redirect_to(@product, :notice => 'Product was successfully created.') } | |
format.xml { render :xml => @product, :status => created, :location => @product } | |
else | |
format.html { render :action => "new" } | |
format.xml { render :xml => @product.errors, :status => :unprocessable_entity } | |
end | |
else |
This file contains 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
/home/visof/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/specification.rb:509:in `read': can't convert Hash into Integer (TypeError) | |
from /home/visof/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/specification.rb:509:in `load' | |
from /home/visof/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:116:in `load_gems_in' | |
from /home/visof/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:115:in `each' | |
from /home/visof/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:115:in `load_gems_in' | |
from /home/visof/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:112:in `reverse_each' | |
from /home/visof/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:112:in `load_gems_in' | |
from /home/visof/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:308:in `refresh!' | |
from /home/visof/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/sourc |
This file contains 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
*** LOCAL GEMS *** | |
actionmailer (2.3.5) | |
actionpack (2.3.5) | |
activemodel (3.0.5) | |
activerecord (2.3.5) | |
activeresource (2.3.5) | |
activesupport (3.0.5, 2.3.5) | |
arel (2.0.9) |
This file contains 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
File not found: lib | |
ERROR: While generating documentation for rails-3.0.5 | |
... MESSAGE: exit | |
... RDOC args: --op /home/visof/.rvm/gems/ruby-1.8.7-p334@ruby187/doc/rails-3.0.5/rdoc --quiet lib --title rails-3.0.5 Documentation | |
(continuing with the rest of the installation) | |
Installing RDoc documentation for rake-0.8.7... |
This file contains 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
#!/home/visof/.rvm/rubies/ruby-1.8.7-p334/bin/ruby | |
require 'rexml/document' | |
include REXML | |
require 'rubygems' | |
require 'nokogiri' | |
require 'mechanize' | |
require 'open-uri' | |
require 'net/http' | |
require 'rexml/document' |
This file contains 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
/home/visof/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- nokogiri (LoadError) | |
from /home/visof/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' | |
from ./fetcher:4 |
OlderNewer