Skip to content

Instantly share code, notes, and snippets.

View djeraseit's full-sized avatar
🎯
Focusing

Theodis Butler djeraseit

🎯
Focusing
View GitHub Profile
@dtbaker
dtbaker / custom_table_hooks.php
Last active August 29, 2015 14:13
Add this to UCM in includes/plugin_custom_table_hooks/custom_table_hooks.php
<?php
class module_custom_table_hooks extends module_base{
public function init(){
hook_add('table_process_data','module_custom_table_hooks::hook_table_process_data');
}
public static function hook_table_process_data($callback, $table_manager){
@robinsmidsrod
robinsmidsrod / pcap_remote.cmd
Last active February 14, 2021 08:50
Capture packets via remote tcpdump using SSH and display in local Wireshark client (Windows batch file)
@echo off
rem Figure out path to plink.exe
set putty_dir_key="HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\PuTTY_is1"
for /f "tokens=3*" %%x in ('reg query %putty_dir_key% /v "InstallLocation"') do set putty_dir=%%x %%y
if not defined putty_dir (
echo Please install PuTTY using Windows installer from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
exit /b 1
)
set plink="%putty_dir%\plink.exe"
@jas-
jas- / ufw-intel.sh
Created December 9, 2014 17:04
Intel gathering for UFW logs
dmesg | awk '{split($7, arr, "="); if (match(arr[2], /[0-9.]/)){print "\nHOST: " arr[2] " ================\n";system("host " arr[2]);system("whois " arr[2]);system("dig " arr[2]);}}' > log
@Proteas
Proteas / Makefile
Created October 31, 2014 15:56
A Guide to Kernel Exploitation - Chapter 4 - Solaris - Heap Overflow - Tested on OpenSolaris-0906
all: driver exp
driver: dummymod.c
cc -D_KERNEL -m64 -xmodel=kernel -c dummymod.c
/usr/bin/ld -r -o dummy dummymod.o
exp:
cc -o hexp hexpl.c -lsched -m64 -lkstat
@dtbaker
dtbaker / signup.php
Created October 6, 2014 05:20
proxy PHP script for handling UCM customer signups
<?php
// upload this signup.php form to your website then change the UCM form action="" to this signup.php file (e.g. <form action="http://yourwebsite.com/signup.php"> )
// CHANGE THIS URL TO YOUR UCM SIGNUP URL
$url = "http://yourwebsite.com/ucm/ext.php?m=customer&h=public_signup";
$ch = curl_init($url);
// put your code here that does any local processing with form submit data
@dtbaker
dtbaker / widget_sample.php
Created August 12, 2014 04:41
Sample PHP for AdminLTE UCM Dashboard Widget
<?php
// this sample widget will show how many jobs were started in the last 7 days:
if(class_exists('module_job',false) && module_job::can_i('view','Jobs')){
$jobs = module_job::get_jobs(array(
'date_start_after'=>date('Y-m-d',strtotime('-7 days'))
),array('columns'=>'u.job_id'));
ob_start();
// icons from http://ionicons.com/
?>
#!/bin/bash
# Install tcpdump on a Tomato firmware router
cd /tmp && wget http://www.dslreports.com/r0/download/1376456~0df06f4164393e0fdd2aa2eede183328/tcpdump.zip && unzip tcpdump.zip && chmod +x tcpdump && rm tcpdump.zip
@fire
fire / gist:dce3576b5631b807070e
Last active June 5, 2023 04:59
HOWTO install Ubuntu to a Native ZFS Root Filesystem

These instructions are for Ubuntu. The procedure for Debian, Mint, or other distributions in the DEB family is similar but not identical.

System Requirements

  • 64-bit Ubuntu Live CD. (Not the alternate installer, and not the 32-bit installer!)
  • AMD64 or EM64T compatible computer. (ie: x86-64)
  • 8GB disk storage available.
  • 2GB memory minimum.

Computers that have less than 2GB of memory run ZFS slowly. 4GB of memory is recommended for normal performance in basic workloads. 16GB of memory is the recommended minimum for deduplication. Enabling deduplication is a permanent change that cannot be easily reverted.

@ranacseruet
ranacseruet / PDAO.php
Last active October 21, 2023 16:31
PHP Dynamic Object With Array and Iterative access capability
<?php
class PDAO implements \ArrayAccess, \Iterator
{
/**
* @var array data
*/
protected $data = array();
/**
@messica
messica / my_pmprosl_customizations.php
Created May 29, 2014 06:47
PMPro Social Locker Settings
<?php
// Constants
define( 'PMPROSL_FREE_LEVEL_ID', 5 ); //membership level to give access to
define( 'PMPROSL_MEMBERSHIP_PERIOD_DAYS', 7 ); //number of days to give visitor access