Skip to content

Instantly share code, notes, and snippets.

View stevenrombauts's full-sized avatar
:shipit:

Steven Rombauts stevenrombauts

:shipit:
View GitHub Profile
@stevenrombauts
stevenrombauts / README.md
Created May 20, 2020 12:12
Use Mailhog to test e-mails
  1. Download Mailhog binary:
wget https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64 -O mailhog
chmod +x mailhog
  1. Start Mailhog:
@stevenrombauts
stevenrombauts / bits.php
Created May 4, 2020 14:53
Comparing bits
<?php
// Always use a factor of 2
$ADMIN = 1;
$TEACHER = 2;
$HUMAN = 4;
// This is how these numbers look in bits:
echo "Admin: " .decbin($ADMIN) . PHP_EOL;
echo "Teacher: ". decbin($TEACHER) . PHP_EOL;
echo "Human: ". decbin($HUMAN) . PHP_EOL;
@stevenrombauts
stevenrombauts / Installing phpmyadmin locally.md
Last active May 20, 2020 12:13
Running phpmyadmin with built-in PHP server

Run phpmyadmin with PHP built-in server

  1. Go to the directory where you want to create the project, for example

    cd ~ # go to your home directory
    mkdir phpmyadmin # create a new director for phpmyadmin
    cd phpmyadmin # go into the directory
    
@stevenrombauts
stevenrombauts / exploit-joomla.py
Last active January 6, 2016 10:28
Joomla test for 20151201 Remote Code Execution Vulnerability
#!/usr/bin/env python
##
# This scripts tests a given website for the 20151201 Remote Code Execution Vulnerability ( https://developer.joomla.org/security-centre/630-20151214-core-remote-code-execution-vulnerability.html)
#
# Instructions:
# - Download this gist: wget https://gist.githubusercontent.com/stevenrombauts/553584e7ab2ef4a832f2/raw/a140c7f5c1bcdc44e71dbfb07da76e418379ba8e/exploit-joomla.py
# - Make executable: chmod +x exploit-joomla.py
# - Run: ./exploit-joomla.py http://yoursite.com/
##
import requests
@stevenrombauts
stevenrombauts / auto-updater-box.sh
Created December 2, 2015 11:46
Update auto-updater Joomlatools Vagrant Box
#!/bin/bash
echo "Updating joomlatools/console .."
composer global remove joomlatools/joomla-console
composer global require joomlatools/console
joomla plugin:install joomlatools/console-joomlatools
echo "Updating the auto-updater scripts .."
wget -O /home/vagrant/scripts/updater/login.sh https://raw.githubusercontent.com/joomlatools/joomla-vagrant/master/puppet/modules/scripts/files/scripts/updater/login.sh
@stevenrombauts
stevenrombauts / 303redirect.php
Created November 20, 2014 14:11
303redirect.php
<?php
// The original redirect target:
$redirect = 'http://www.lokalepolitie.be/administrator/5388?view=dashboard';
// If the form is posted, return the following headers:
if ($_POST['_token'])
{
header('HTTP/1.1 303 See Other');
header('Connection: Keep-Alive');
header('Content-Length: 265');
@stevenrombauts
stevenrombauts / newrelic-mysql.sh
Last active August 29, 2015 14:07
init.d script to manage New Relic MySQL plugin (java)
#!/bin/bash
### BEGIN INIT INFO
# Provides: newrelic-mysql
# Required-Start: $local_fs $remote_fs $network $syslog $named
# Required-Stop: $local_fs $remote_fs $network $syslog $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Interactive: true
# Short-Description: Start/stop New Relic MySQL plugin
### END INIT INFO

Keybase proof

I hereby claim:

  • I am stevenrombauts on github.
  • I am stevenrombauts (https://keybase.io/stevenrombauts) on keybase.
  • I have a public key whose fingerprint is F7C5 734E D67D 2B27 E822 B828 6D9F B13A 592F C2C0

To claim this, I am signing this object:

@stevenrombauts
stevenrombauts / progressbar.sh
Created February 26, 2014 14:37
Bash Progress Bar
#!/bin/bash
# Slick Progress Bar
# Created by: Ian Brown (ijbrown@hotmail.com)
# Please share with me your modifications
# Note: From http://stackoverflow.com/questions/11592583/bash-progress-bar
# Functions
PUT(){ echo -en "\033[${1};${2}H";}
DRAW(){ echo -en "\033%";echo -en "\033(0";}
WRITE(){ echo -en "\033(B";}
HIDECURSOR(){ echo -en "\033[?25l";}
@stevenrombauts
stevenrombauts / parse_changelog.php
Last active December 27, 2015 06:19
Parse changelog using regular expression.
<?php
$changelog = <<<EOL
ADDED-Complete new frontend default theme. Optimised to easily blend into any Joomla template.
added: Fully refactored administrator to fully match Joomla 1.5's native look and feel
Wuuut? Testing, testing.
fixed DOCLlink, search plugin and modules are now included in the package and installed automatically
improved Performed a full security audit
improved
added - Performance optimizations
EOL;