Skip to content

Instantly share code, notes, and snippets.

@mouseroot
Last active December 16, 2015 03:19
Show Gist options
  • Save mouseroot/5369062 to your computer and use it in GitHub Desktop.
Save mouseroot/5369062 to your computer and use it in GitHub Desktop.
Mousetech.org Shell
#!/bin/bash
#Get number of parameters
#if its 2 then continue
if [ "$#" -eq 2 ]; then
url="$1"
dir="$2"
mkdir -p $dir
domain="images.4chan.org"
user_agent="Mozilla"
static_params="-p -nd -nc -r -erobots=off -H"
accepted_filetypes=".png,.jpg,.gif"
wget $static_params -P $dir -U $user_agent -D $domain -A $accepted_filetypes $url 2>&1 | grep -i "downloaded"
#Save url to a history file
echo $url >> /etc/4chandl_history.txt
echo "4chandl complete!"
#if number of params is not 2 print usage
else
echo "4chandl <url> <location to download to>"
exit
fi
#!/bin/bash
#Script to check /etc/proxylist
proxy_file="/etc/proxylist.txt"
for proxy in $(cat $proxy_file | grep -v "^#" | awk -F ":" '{print $1}')
do
#ping -n 1 $proxy | grep -i "Reply"
#ping -n 1 $proxy | grep -i "Reply" | awk -F "time=.*ms" '{print $2}' | sed "s/ //g"
ping -n 1 $proxy | grep -i "reply" | awk -F ":" '{print $1}'
done
#!/bin/bash
echo -ne "\033[2J"
awk
bash
bc
cat
chmod
cp
cut
expr
grep
gzip
head
id
ls
mkdir
msysmnt
mv
nano
printf
ps
pwd
rm
rmdir
scp
sed
sleep
sort
tail
tar
touch
tr
uname
uniq
which
whoami
4chan image downloader
420chan thread replier
proxy_checker
welcome_script
alias_helper
filesystem_backup
subnet_ping
cls
/etc/ - a great place for config files and log files
/etc/nanorc - nano configuration file
/etc/fstab - holds all the mounts
/etc/profile - configuruation for bash login
/etc/proxylist.txt - holds a list of proxies
/etc/4chandl_history.txt - holds a list of urls used by 4chandl
bin/
-net/
-scripts/
etc/
home/
mnt/
opt/
tmp/
start.bat
bin - holds all the standard GNU core binaries
bin/net - holds all the network tools like ngrep,curl,wget and netcat
bin/scripts - holds all custom shell scripts (that I have crafted myself)
etc/ - holds some binary setting files (fstab,nanorc and profile)
home/ - the users home directory (i plan to map this to C:/Users/<user>/ via fstab)
opt/ - extra place for applications
tmp/ - a garbage can (cleared on start and exit)
start.bat - init script that populates fstab and launches bash
netcat
socat
ngrep
wget
curl
phantomjs
/opt/ - a place to mirror installed applications
C:\Python2X\ -> /opt/python2X
C:\wamp\bin\php\php5.3.13 -> /opt/php
could even go asfar as mirroring Program Files and Program Files (x86)
# 2013, Mouseroot@mousetech.org
# mouseroot@gmail.com
#
# Set path
#
bin_dir="/bin"
network_dir="/bin/net"
scripts_dir="bin/scripts"
PATH=".:$bin_dir:$network_dir:$scripts_dir:$PATH"
#
# Login name
#
login_name=$(id -un)
LOGNAME=$login_name
#
# Home directory
#
home_dir="/home/$login_name"
HOME=$home_dir
mkdir -p $home_dir
#
# History file
#
history_file="$home_dir/.bash_history"
HISTFILE=$history_file
#
# Shell prompt
# Looks like: [Thu Apr 11 - 10:42 PM Mouse-PC/]$
#
PS1='[\e[0;33m\d - \@ \[\033]0;Mousetech Shell> \w\007\033[32m\]\h\[\033[33m\w\033[0m\]]\$ '
#
# export everything
#
export LOGNAME HOME HISTFILE PS1 PATH
#
# Setup some aliases
# cd into home_dir
alias clear="cls"
alias ls="ls --color=auto"
alias dir="ls --color=auto --format=long"
alias 4chandl="/bin/scripts/4chan_downloader.sh"
alias 420reply="/bin/scripts/420chan_poster.sh"
alias welcome="/bin/scripts/welcome.sh"
alias xhelp="/bin/scripts/xhelp.sh"
alias grep="grep --color=auto"
alias longping="ping -t"
alias mount="_mount"
alias nano="nano -T 4 -S"
alias help=xhelp
#
# Shell options
#
shopt -s cdspell
shopt -s dotglob
shopt -s checkwinsize
cd $home_dir
rem 2013,mouseroot@mousetech.org
rem mouseroot@gmail.com
cls
@echo off
rem -- Setup fstab --
echo Setting up fstab
echo %CD% / > etc/fstab
echo C:\wamp\www /mnt/www >> etc/fstab
echo C:\ /mnt/c >> etc/fstab
cd bin
bash --login -i
#!/bin/bash
echo -e "\e[1;33mMousetech Shell\e[0;35m v0.3"
echo -e "User: \e[1;31m$login_name"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment