Skip to content

Instantly share code, notes, and snippets.

Rodrigo Vazquez rodvan

Block or report user

Report or block rodvan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rodvan
rodvan / bash-cheatsheet.sh
Created Nov 19, 2018 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
View bash-cheatsheet.sh
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
View selenium-webdriver-cheatsheet.md

API workthough

  1. Open a browser

    # start an instance of firefox with selenium-webdriver
    driver = Selenium::WebDriver.for :firefox
    # :chrome -> chrome
    # :ie     -> iexplore
    
  • Go to a specified URL
@rodvan
rodvan / .htaccess
Created Apr 3, 2017 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
View .htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@rodvan
rodvan / gist:6084559f71b2ab78b6ede25ae47bcdd0
Created Dec 18, 2016 — forked from jonathanmoore/gist:2640302
Get the share counts from various APIs
View gist:6084559f71b2ab78b6ede25ae47bcdd0

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter

@rodvan
rodvan / tor_curl.php
Created Jun 27, 2016 — forked from zachflower/tor_curl.php
How To Anonymize PHP cURL Requests Using Tor
View tor_curl.php
<?php
$ip = '127.0.0.1';
$port = '9051';
$auth = 'PASSWORD';
$command = 'signal NEWNYM';
$fp = fsockopen($ip,$port,$error_number,$err_string,10);
if(!$fp) { echo "ERROR: $error_number : $err_string";
return false;
@rodvan
rodvan / PHP-CURL-Tor-Tutorial.md
Created Jun 27, 2016 — forked from sxss/PHP-CURL-Tor-Tutorial.md
PHP: CURL Requests with Tor
View PHP-CURL-Tor-Tutorial.md

#CURL Connections with Tor

Install Apache, PHP, CURL & Tor with apt-get

sudo apt-get install -y apache2 php5 php5-curl tor

Tor creates a proxy on your mashine with port 9050 for SOCKS5 connections.

View gist:666d42423b62f5e50cc2de6dfc3a80b4
#!/usr/bin/perl
####### DON'T MODIF IT or SCRIPT NOT WORK #######
$powered="Shanti"; #
$mail="shechantika@gmail.com"; #
#################################################
################################################
use HTTP::Request; #
use HTTP::Request::Common; #
use HTTP::Request::Common qw(POST); #
use LWP::Simple; #
@rodvan
rodvan / Hackback
Created Jun 26, 2016 — forked from denji/Hackback
Nikto, NMap , Skipfish and friends http://www.security-marathon.be/?p=844
View Hackback
_ _ _ ____ _ _
| | | | __ _ ___| | __ | __ ) __ _ ___| | _| |
| |_| |/ _` |/ __| |/ / | _ \ / _` |/ __| |/ / |
| _ | (_| | (__| < | |_) | (_| | (__| <|_|
|_| |_|\__,_|\___|_|\_\ |____/ \__,_|\___|_|\_(_)
A DIY Guide for those without the patience to wait for whistleblowers
--[ 1 ]-- Introduction
@rodvan
rodvan / pentestTools.sh
Created Jun 25, 2016 — forked from opnchaudhary/pentestTools.sh
This script will download the security tools needed for pentesting in fedora
View pentestTools.sh
#!/bin/sh
#Reconnaissance
yum install dsniff hping3 nc6 nc ncrack ngrep nmap nmap-frontend p0f sing scanssh scapy socat tcpdump unicornscan wireshark-gnome xprobe2 nbtscan tcpxtract firewalk hunt dnsenum iftop argus ettercap ettercap-gtk packETH iptraf pcapdiff etherape lynis netsniff-ng tcpjunk ssldump yersinia net-snmp openvas-client openvas-scanner
#Forensics
yum install ddrescue gparted hexedit testdisk foremost sectool-gui scanmem sleuthkit unhide examiner dc3dd afftools srm firstaidkit-plugin-all ntfs-3g ntfsprogs
#Web Application Testing
yum install httping nikto ratproxy lbd skipfish
@rodvan
rodvan / nginx.conf
Created Jun 18, 2016 — forked from nateware/nginx.conf
Nginx sample config for EC2
View nginx.conf
#
# Sample nginx.conf optimized for EC2 c1.medium to xlarge instances.
# Also look at the haproxy.conf file for how the backend is balanced.
#
user "nginx" "nginx";
worker_processes 10;
error_log /var/log/nginx_error.log info;
You can’t perform that action at this time.