Skip to content

Instantly share code, notes, and snippets.

View DavidHernandez's full-sized avatar
📎

David Hernández DavidHernandez

📎
View GitHub Profile
@DavidHernandez
DavidHernandez / d7-autologin.php
Created October 16, 2014 17:19
This is another PoC for the SA-CORE-2014-005 vulnerability. Instead of updating the users table, activates an anonymous session to change your session into admin.
<?php
/**
* D7 autologin.
* Exploits SA-CORE-2014-005 to change your anonymous session into an uid 1 session.
* In order to work, first you need to have an anonymous session in the sessions table.
* One way to achieve this is to go to the update.php page.
*
* Usage: php d7-autologin.php http://example.com 127.0.0.1
*
@DavidHernandez
DavidHernandez / script
Created September 22, 2014 10:40
A little script to install some Drupal tables. It could be a drush command, but I'm feeling lazy...
<?php
// Module name
$module = '';
// List of tables to install
$tables = array('');
$schemas = drupal_get_schema_unprocessed($module);
foreach ($schemas as $key => $schema) {
@DavidHernandez
DavidHernandez / Sci-fi books
Last active January 25, 2016 15:12
David's Sci-Fi book collection
The moon is a harsh mistress - Robert A. Heinlein - 5*
A canticle for Leibowitz - Walter M. Miller 4*
Flowers for Algernon - Daniel Keyes 5*
The Forever War - Joe Haldeman - 4*
The Stars my destination (also known as Tiger! Tiger!) - Alfred Bester - 5*
The Road - Cormac Mc Carthy - 4*
God is Dead - Ron Currie Jr. - 4*
The world without us - Alan Weisman (not really sci fi, but interesting, anyways) - 4*
Animal Farm - George Orwell - 5*
1984 - George Orwell - 5*