Skip to content

Instantly share code, notes, and snippets.

Avatar
☠️

pyratebeard

☠️
View GitHub Profile
View passwd_gen.py
#!/usr/bin/env python
import string
import random
import hashlib
import fileinput
import os
# function to generate a random password of 12 characters, using upper/lowercase letters,
# digits, and a small group of punctuation characters.
@pyratebeard
pyratebeard / user_search.sh
Created Apr 25, 2017
Search /etc/passwd for usernames
View user_search.sh
#!/bin/bash -
for user in $* ; do
user_search=$(grep -c $user /etc/passwd)
case $user_search in
0) printf "User '$user' does not exist\n" ;;
1) printf "User '$user' does exist\n" ;;
*) printf "Something went wrong\n" ;;
esac
done
View keybase.md

Keybase proof

I hereby claim:

  • I am pyratebeard on github.
  • I am pyratebeard (https://keybase.io/pyratebeard) on keybase.
  • I have a public key whose fingerprint is 7A8E 129D BE67 9DAB AEB3 37C5 C787 7C71 5113 A16D

To claim this, I am signing this object:

View file_renamer.sh
#!/bin/bash
targetDir=$1
cd $targetDir
for i in *; do
if [ ! -f "$i" ]; then
continue
else
mv "$i" $(echo "$i" | tr "[:upper:]" "[:lower:]" | tr " " "_")
@pyratebeard
pyratebeard / term-colours.sh
Last active Oct 5, 2016
list the term colour numbers in colour
View term-colours.sh
for i in {0..255} ; do
printf "\x1b[38;5;${i}mcolour${i}\n"
done
@pyratebeard
pyratebeard / dedsec.sh
Created Jul 5, 2016 — forked from gschlabitz/dedsec.sh
Echo dedsec skull and change prompt to make your shell totally haxx0r
View dedsec.sh
#!/bin/bash
echo "
pN▒g▒p▒g▒▒g▒ge
▒▒▒▒▒▒▒░░▒░▒░▒
_0▒░▒░▒░░▒▒▒▒▒▒▒!
4▒▒▒▒▒░░░▒░░▒▒▒▒▒Y
\` \~~#00░░0 MMM\"M│
\`gM░M7
│ 00q0 │