- mysql: 14.14 Distrib 5.5.14
- host:
127.0.0.1
- port:
3306
- user:
victim
- password:
56789
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 'webrick' | |
class Server < WEBrick::HTTPServlet::AbstractServlet | |
def self.start(port,host=nil) | |
server = WEBrick::HTTPServer.new(:Host => host, :Port => port) | |
server.mount '/', self | |
trap('INT') { server.shutdown } |
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
$ git clone git://github.com/ronin-ruby/ronin.git | |
$ cd ronin/ | |
$ bundle install | |
$ bundle show rspec | |
/home/hal/.rvm/gems/jruby-1.6.6/gems/rspec-2.8.0 | |
$ jruby --1.9 -S rake spec | |
Failures: | |
1) Ronin::IPAddress extract should extract multiple IP Addresses from text |
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 'date' | |
require 'tempfile' | |
require 'fileutils' | |
YEAR = Date.today.year.to_s | |
LAST_YEAR = (Date.today.year - 1).to_s | |
Dir.glob('lib/{**/}*.rb') do |path| | |
File.open(path) do |file| | |
tempfile = Tempfile.new('bump_copyright') |
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
#!/usr/bin/env ronin-payload -f | |
require 'ronin/payloads/shellcode' | |
Ronin::Payloads::Shellcode.object do | |
cache do | |
self.name = 'local_shell' | |
self.description = %{ | |
Shellcode that spawns a local /bin/sh shell |
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 'ronin/code/asm' | |
require 'ronin/formatting/binary' | |
program = Ronin::Code.asm(:arch => :x86) do | |
xor eax, eax | |
push eax | |
push 0x68732f2f | |
push 0x6e69622f | |
mov esp, ebx | |
push eax |
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
module DataMapper | |
class Collection | |
# | |
# EagerLoader takes a QueryPath object and loads all relationships | |
# referenced in the path, into an existing Collection. | |
# | |
# Using eager-loading allows you to optimize out the classic "n+1" | |
# query problem, when you intend to iterate over several arbitrarily deeply | |
# nested relationships. One query per relationship is executed, | |
# vs one query per record. |
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
$(function() { | |
var $slides = $("#slides"); | |
var $currentSlide = null; | |
function newSlide() { | |
$currentSlide = $('<div class="slide"></div>') | |
$currentSlide.appendTo($slides); | |
} | |
newSlide(); |
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
module Test | |
def Test.mytest | |
end | |
end | |
Test.methods(false) | |
# => ["mytest"] | |
Test.method_defined?("mytest") | |
# => false |