Skip to content

Instantly share code, notes, and snippets.

View ZephiroRB's full-sized avatar
🏠
Working from home

Carlos Montalvo ZephiroRB

🏠
Working from home
View GitHub Profile
#!/usr/bin/env python2
"""
Author: takeshix <[email protected]>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford ([email protected]).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser
# Copyright (c) 2014 Justin W. Smith
# Don't be evil!
require 'base64'
require 'socket'
require 'optparse'
options = {port: 443}
optparser = OptionParser.new do |opts|
@ZephiroRB
ZephiroRB / generators.rb
Last active July 25, 2017 22:04
Setup Rails
Rails.application.config.generators do |g|
g.test_framework :false
g.helper false
g.assets false
g.view_specs false
end

installing postgresql 9.3.2 on ubuntu 12.04

$ echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list
$ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install postgresql-9.3 postgresql-contrib-9.3

you should succesfully installing postgresql 9.3.2 on your machine.

# 1. Rename this file to rack_attack.rb
# 2. Review the paths_to_be_protected and add any other path you need protecting
#
paths_to_be_protected = [
"#{Rails.application.config.relative_url_root}/users/password",
"#{Rails.application.config.relative_url_root}/users/sign_in",
"#{Rails.application.config.relative_url_root}/api/#{API::API.version}/session.json",
"#{Rails.application.config.relative_url_root}/api/#{API::API.version}/session",
"#{Rails.application.config.relative_url_root}/users",
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.16470588743686676</real>
<key>Green Component</key>
<real>0.20784313976764679</real>
@ZephiroRB
ZephiroRB / nginx.conf
Last active August 29, 2015 14:11 — forked from jrom/nginx.conf
if ($request_uri = /) {
set $test A;
}
if ($host ~* teambox.com) {
set $test "${test}B";
}
if ($http_cookie !~* "auth_token") {
set $test "${test}C";
@ZephiroRB
ZephiroRB / Parser.py
Last active August 29, 2015 14:16 — forked from pbdeuchler/Parser.py
#!/usr/bin/python -tt
#Didn't you hear? The bird is the word!
#@version: 0.1
import sys
def main(filename):
f = open(filename, "r")
f2 = open("log.txt", "w")
count = 0
for line in f:
@ZephiroRB
ZephiroRB / install_express_and_sequelize_and_postgresql.txt
Last active July 25, 2017 22:01
Express + sequelize + Postgresql
npm install -g express express-generator
express zephiro
npm install sequelize sequelize-cli pg pg-hstore --save
node_modules/.bin/sequelize init
node_modules/.bin/sequelize model:create --name User --attributes "email:string, fullname:string, username:string, password:string"
@ZephiroRB
ZephiroRB / install_phoenix.txt
Last active July 25, 2017 22:00
Elixir + Phoenix (Ubuntu 14.04)
#Add Erlang Solutions repo:
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && sudo dpkg -i erlang-solutions_1.0_all.deb
#Run:
sudo apt-get update
#Install the Erlang/OTP platform and all of its applications:
sudo apt-get install esl-erlang