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 ruby | |
require 'rack' | |
FILES = { | |
'/index.html' => 'index.html' | |
} | |
Rack::Handler.get('Thin').run proc { |env| | |
path = env['PATH_INFO'] |
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 'dm-core' | |
require 'dm-validations' | |
require 'dm-predefined' | |
class Country | |
include DataMapper::Resource | |
include DataMapper::Migrations | |
include DataMapper::Predefined |
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
# Country Code List: ISO 3166-1993 (E) | |
module Countries | |
Mexico = 'MX' | |
GuineaBissau = 'GW' | |
Afghanistan = 'AF' | |
Ethiopia = 'ET' | |
SyrianArabRepublic = 'SY' | |
SvalbardJanMayenIslands = 'SJ' | |
Tonga = 'TO' | |
Pakistan = 'PK' |
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 ruby | |
require 'ronin/scanners/web' | |
require 'ronin/sql/scanner' | |
require 'ronin/php/lfi/scanner' | |
require 'ronin/php/rfi/scanner' | |
if ARGV.empty? | |
STDERR.puts "usage: #{$0} HOST ..." |
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 ruby | |
require 'ronin/dorks' | |
module SophSec | |
module Twitter | |
def Twitter.private_mesgs_dork(user_name) | |
dork = Ronin::Web::Dorks.search(:site => "twitter.com/#{user_name}") | |
end |
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 'rack/utils' | |
module Rack | |
# | |
# EnforceSSL is a Rack middleware app that enforces that users visit | |
# specific paths via HTTPS. If a sensitive path is requested over | |
# plain-text HTTP, a 307 Redirect will be issued leading to the HTTPS | |
# version of the Requested URI. | |
# | |
# MIT License - Hal Brodigan (postmodern.mod3 at gmail.com) |
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 'ipaddr' | |
module Rack | |
# | |
# BanHammer is a Rack middleware app that restricts access to your server | |
# using a black-list of IPv4/IPv6 addresses and ranges. | |
# | |
# MIT License - Hal Brodigan (postmodern.mod3 at gmail.com) | |
# | |
class BanHammer |
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 Rack | |
# | |
# RefererControl is a Rack middleware app which restricts access to paths | |
# based on the Referer header. Using RefererControl you can make sure | |
# users follow the intended flow of a website. If a controlled path is | |
# visited with an unacceptable Referer URI, then a simple 307 Redirect | |
# response is returned. | |
# | |
# RefererControl should also make Cross Site Request Forgery (CSRF) a | |
# little more difficult to exploit; but not impossible using JavaScript. |
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 Rack | |
# | |
# The LieServer is a simple Rack middleware app which allows one to spoof | |
# the +Server+ header in responses for every request, requests to certain | |
# sub-directories or paths which match a regular expression. | |
# | |
# Be deceitful to would be attackers, tell them your running IIS 3.0. | |
# | |
# MIT License - Hal Brodigan (postmodern.mod3 at gmail.com) | |
# |
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 'tweetstream' | |
require 'rufus/tokyo' | |
module SophSec | |
module Twitter | |
# | |
# Watches tweets using the TweetStream library. | |
# | |
# @param [Hash] options | |
# |