code stringlengths 1 1.73M | language stringclasses 1
value |
|---|---|
# 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 |
# 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'
include Metasm
module VirtDbg
class Forensic1394 < Metasm::DynLdr
new_api_c File.read(File.join(VIRTDBGDIR, "inc", ... | 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 '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 |
# 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 |
class CreateCompanies < ActiveRecord::Migration
def self.up
create_table :companies do |t|
end
end
def self.down
drop_table :companies
end
end
| Ruby |
class CreateAttributeTypes < ActiveRecord::Migration
def self.up
create_table :attribute_types do |t|
end
end
def self.down
drop_table :attribute_types
end
end
| Ruby |
class CreateComponents < ActiveRecord::Migration
def self.up
create_table :components do |t|
end
end
def self.down
drop_table :components
end
end
| Ruby |
class CreateEventLogs < ActiveRecord::Migration
def self.up
create_table :event_logs do |t|
end
end
def self.down
drop_table :event_logs
end
end
| Ruby |
class CreateProjects < ActiveRecord::Migration
def self.up
create_table :projects do |t|
end
end
def self.down
drop_table :projects
end
end
| Ruby |
class CreateAttributeDefs < ActiveRecord::Migration
def self.up
create_table :attribute_defs do |t|
end
end
def self.down
drop_table :attribute_defs
end
end
| Ruby |
class CreateEvenLogs < ActiveRecord::Migration
def self.up
create_table :even_logs do |t|
end
end
def self.down
drop_table :even_logs
end
end
| Ruby |
class CreateSettings < ActiveRecord::Migration
def self.up
create_table :settings do |t|
end
end
def self.down
drop_table :settings
end
end
| Ruby |
class CreateWeblayouts < ActiveRecord::Migration
def self.up
create_table :weblayouts do |t|
end
end
def self.down
drop_table :weblayouts
end
end
| Ruby |
class CreateAddresses < ActiveRecord::Migration
def self.up
create_table :addresses do |t|
end
end
def self.down
drop_table :addresses
end
end
| Ruby |
class CreateArchitectures < ActiveRecord::Migration
def self.up
create_table :architectures do |t|
end
end
def self.down
drop_table :architectures
end
end
| Ruby |
class CreateTemplates < ActiveRecord::Migration
def self.up
create_table :templates do |t|
end
end
def self.down
drop_table :templates
end
end
| Ruby |
class CreateProfiles < ActiveRecord::Migration
def self.up
create_table :profiles do |t|
end
end
def self.down
drop_table :profiles
end
end
| Ruby |
class CreateTestTemplates < ActiveRecord::Migration
def self.up
create_table :test_templates do |t|
end
end
def self.down
drop_table :test_templates
end
end
| Ruby |
class CreateComponentDefs < ActiveRecord::Migration
def self.up
create_table :component_defs do |t|
end
end
def self.down
drop_table :component_defs
end
end
| Ruby |
class CreateUsers < ActiveRecord::Migration
def self.up
create_table :users do |t|
end
end
def self.down
drop_table :users
end
end
| Ruby |
class CreateLayers < ActiveRecord::Migration
def self.up
create_table :layers do |t|
end
end
def self.down
drop_table :layers
end
end
| Ruby |
class CreateHelps < ActiveRecord::Migration
def self.up
create_table :helps do |t|
end
end
def self.down
drop_table :helps
end
end
| Ruby |
class CreateConfigurations < ActiveRecord::Migration
def self.up
create_table :configurations do |t|
end
end
def self.down
drop_table :configurations
end
end
| Ruby |
class CreateAttributes < ActiveRecord::Migration
def self.up
create_table :attributes do |t|
end
end
def self.down
drop_table :attributes
end
end
| Ruby |
ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'test_help'
class Test::Unit::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 datab... | Ruby |
#!/usr/local/bin/ruby
require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impai... | Ruby |
#!/usr/local/bin/ruby
#
# You may specify the path to the FastCGI crash log (a log of unhandled
# exceptions which forced the FastCGI instance to exit, great for debugging)
# and the number of requests to process before running garbage collection.
#
# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.lo... | Ruby |
#!/usr/local/bin/ruby
require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impai... | Ruby |
#!/usr/local/bin/ruby
require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impai... | Ruby |
#!/usr/local/bin/ruby
#
# You may specify the path to the FastCGI crash log (a log of unhandled
# exceptions which forced the FastCGI instance to exit, great for debugging)
# and the number of requests to process before running garbage collection.
#
# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.lo... | Ruby |
#!/usr/local/bin/ruby
require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impai... | Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/breakpointer' | 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/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/breakpointer' | 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/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/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/process/spawner'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/spawner'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/inspector'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/reaper'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/reaper'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/inspector'
| 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 |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/generate' | Ruby |
# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
end
| Ruby |
module ProjectHelper
end
| Ruby |
module MytemplateHelper
end
| Ruby |
module UserHelper
end
| Ruby |
module ListHelper
end
| Ruby |
module LoginHelper
end
| Ruby |
module AdminCompanyHelper
end
| Ruby |
module ProjectsHelper
end
| Ruby |
module AdminHelper
end
| Ruby |
module LayersHelper
end
| Ruby |
module AdminAttributeTypeHelper
end
| Ruby |
module TemplatesHelper
end
| Ruby |
module ArchitecturesHelper
end
| Ruby |
module ProfilesHelper
end
| Ruby |
module AdminLangHelper
end
| Ruby |
class Layer < ActiveRecord::Base
belongs_to :architecture
has_many :component_def
end
| Ruby |
class EvenLog < ActiveRecord::Base
end
| Ruby |
class Attribute < ActiveRecord::Base
end
| Ruby |
class Configuration < ActiveRecord::Base
belongs_to :company
end
| Ruby |
class TestTemplate < ActiveRecord::Base
belongs_to :component_def
end
| Ruby |
class Template < ActiveRecord::Base
belongs_to :component_def
end
| Ruby |
class Help < ActiveRecord::Base
end
| Ruby |
class EventLog < ActiveRecord::Base
end
| Ruby |
class ComponentDef < ActiveRecord::Base
has_one :template
belongs_to :layer
has_many :attribute_def
end
| Ruby |
# copyright Satsang Technologies Limited 2002-2007
require "digest/sha1"
class User < ActiveRecord::Base
attr_accessor :txtpassword
attr_accessible :username, :txtpassword,:company_id,:email, :profile_id
validates_presence_of :username,:txtpassword,:company_id,:email, :profile_id
validates_uniqueness_of :us... | Ruby |
class Architecture < ActiveRecord::Base
has_many :layers, :foreign_key => 'architecture_id', :dependent => :destroy
belongs_to :user, :class_name => 'user', :foreign_key => 'user_id', :dependent => :destroy
end
| Ruby |
class Project < ActiveRecord::Base
belongs_to :user
validates_presence_of :name,:architecture_id
end
| Ruby |
class AttributeDef < ActiveRecord::Base
end
| Ruby |
class AttributeType < ActiveRecord::Base
validates_uniqueness_of :atype
validates_presence_of :name,:atype, :catagory
end
| Ruby |
class Projects < ActiveRecord::Base
end
| Ruby |
class Weblayout < ActiveRecord::Base
end
| Ruby |
class Component < ActiveRecord::Base
belongs_to :project
end
| Ruby |
class Company < ActiveRecord::Base
has_many :user
has_many :architeture
validates_presence_of :name, :account_type, :phone
validates_uniqueness_of :name
end
| Ruby |
class Profile < ActiveRecord::Base
belongs_to :user
end
| Ruby |
class Language < ActiveRecord::Base
validates_presence_of :language
validates_uniqueness_of :language
end
| Ruby |
class UserController < ApplicationController
before_filter :authorize,:logevent
layout "home"
def index
end
def projects
end
def architectures
end
def components
end
def templates
end
end
| Ruby |
class AdminAttributeTypeController < ApplicationController
before_filter :authorize, :logevent
layout "admin"
def index
list
render :action => 'list'
end
# GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
verify :method => :post, :only => [ :destroy, :create, :update ],... | Ruby |
class ProjectsController < ApplicationController
before_filter :authorize, :logevent
layout "home"
def index
list
render :action => 'list'
end
# GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
verify :method => :post, :only => [ :destroy, :create, :update ],
:... | Ruby |
class ProfilesController < ApplicationController
before_filter :authorize, :logevent
layout "admin"
def index
list
render :action => 'list'
end
# GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
verify :method => :post, :only => [ :destroy, :create, :update ],
... | Ruby |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.