Initial commit of files
This commit is contained in:
7
sbin/apt-search
Executable file
7
sbin/apt-search
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
for i in $@
|
||||
do
|
||||
apt-cache search $i | grep -i $i | more
|
||||
done
|
||||
|
||||
110
sbin/linux-setup
Executable file
110
sbin/linux-setup
Executable file
@ -0,0 +1,110 @@
|
||||
#!/bin/sh
|
||||
|
||||
# little things
|
||||
sudo adduser $USER dialout
|
||||
sudo adduser $USER plugdev
|
||||
|
||||
ver=`uname -r`
|
||||
echo "Build packages:"
|
||||
sudo apt-get install -y build-essential
|
||||
sudo apt-get install -y linux-headers-$ver
|
||||
echo
|
||||
|
||||
# Must have
|
||||
echo "Essentials:"
|
||||
sudo apt-get install -y --ignore-missing git git-extras git-cola subversion subversion-tools openssh-server imagemagick bc ddd flip tcpdump zip unzip minicom netcat putty filezilla vlc terminator guake exfat-fuse exfat-utils openssh-server x11vnc xtightvncviewer geeqie okular ocaml
|
||||
echo
|
||||
|
||||
echo "Network:"
|
||||
sudo apt-get install -y --ignore-missing nfs-common nfs-kernel-server net-tools chkrootkit secure-delete hashdeep kismet kismet-plugins netcat socat cryptcat dsniff etherape socat spectools tcpdump tshark wireshark nethogs wifite tcpreplay bittwist ethtool
|
||||
echo
|
||||
|
||||
echo "Bluetooth (install libbtbb and ubertooth manually):"
|
||||
sudo apt-get install -y --ignore-missing bluez-tools bluez-tests bluez-hcidump ubertooth-firmware spectools bluedevil blueman bluewho btscanner
|
||||
echo ""
|
||||
|
||||
echo "Virtual:"
|
||||
sudo apt-get install -y --ignore-missing docker docker.io qemu qemu-kvm qemu-user qemu-system qemu-utils virtualbox virtualbox-guest-additions-iso
|
||||
echo
|
||||
|
||||
sudo adduser $USER docker
|
||||
echo "==========="
|
||||
|
||||
# Development
|
||||
echo "C/C++ Development:"
|
||||
sudo apt-get install -y --ignore-missing libboost-dev libbz2-dev libgd-dev libmuparser-dev libmysqlclient-dev libxml2-dev xutils-dev libbz2-dev libkml-dev libmuparser-dev libmuparserx-dev liburiparser-dev libpopt-dev libpcap-dev libsodium-dev libxml2-dev mingw-w64 clang diffutils doxygen doxygen-gui graphviz patch ctags radare2 autoconf qt5-qmake qtbase5-dev kdevelop qt5-default qtcreator pyqt5-dev pyqt5-dev-tools protobuf-c-compiler protobuf-compiler cmake libjson-c-dev
|
||||
echo
|
||||
|
||||
echo "32 bit Development"
|
||||
sudo apt-get install -y --ignore-missing libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
|
||||
echo
|
||||
|
||||
echo "Java:"
|
||||
sudo apt-get install -y --ignore-missing netbeans
|
||||
|
||||
echo "Other languages:"
|
||||
sudo apt-get install -y --ignore-missing golang julia lua5.3 rustc ruby-full
|
||||
echo
|
||||
|
||||
echo "Python 3 packages:"
|
||||
sudo apt-get install -y --ignore-missing python3-all python3-pip python3-dev python3-tk idle3 spyder3 python3-numpy python3-serial python3-can virtualenv virtualenvwrapper
|
||||
sudo apt-get install -y --ignore-missing python3-pil.imagetk glade python3-gi pyqt5-dev pyqt5-dev-tools
|
||||
sudo -H pip install --upgrade pip
|
||||
|
||||
for i in pyserial numpy pyasn1 matplotlib pyqt5 scapy pyside2
|
||||
do
|
||||
echo $i
|
||||
echo -----------
|
||||
sudo -H pip install $i
|
||||
done
|
||||
echo "=================="
|
||||
echo
|
||||
|
||||
# Packages
|
||||
echo "Automotive CAN/GPS:"
|
||||
sudo apt-get install -y --ignore-missing can-utils gis-gps gpsbabel gpsbabel-gui gpsman maptool marble navit viking gpsd gpsd-clients
|
||||
echo
|
||||
|
||||
echo "GNU/SDR Radio"
|
||||
sudo apt-get install -y --ignore-missing airspy bladerf hackrf gnuradio gr-air-modes gr-fosphor gr-osmosdr gqrx-sdr inspectrum osmo-sdr rtl-sdr quisk librtlsdr-dev
|
||||
echo
|
||||
|
||||
echo "HAM Radio:"
|
||||
sudo apt-get install -y --ignore-missing hamradio-antenna hamradio-datamodes hamradio-digitalvoice hamradio-logging hamradio-packetmodes hamradio-rigcontrol hamradio-satellite hamradio-sdr hamradio-tasks hamradio-tools icom chirp fldigi grig gpredict wsjtx
|
||||
echo
|
||||
|
||||
echo "Debian Science:"
|
||||
#sudo apt-get install -y --ignore-missing science-astronomy science-electronics science-engineering science-mathematics science-physics science-viewing
|
||||
sudo apt-get install -y --ignore-missing freemat scilab octave
|
||||
echo
|
||||
|
||||
echo "Cryptography:"
|
||||
sudo apt-get install -y --ignore-missing codecrypt libsodium-dev libcrypto++-dev
|
||||
echo
|
||||
|
||||
echo "Embedded:"
|
||||
sudo apt-get install -y --ignore-missing arduino avrdude avarice gdb-avr binutils-avr avr-libc crasm d52 pasmo sdcc sdcc-libraries as31 dis51 emu8051 mcu8051ide s51dude gcc-m68hc1x binutils-m68hc1x z80asm z80dasm libnewlib-dev flashrom openocd usbprog usbprog-gui setserial
|
||||
echo
|
||||
|
||||
echo "Robotics:"
|
||||
sudo apt-get install -y --ignore-missing brickos lnpd nbc nqc
|
||||
echo
|
||||
|
||||
echo "Emulators:"
|
||||
echo
|
||||
sudo apt-get install -y --ignore-missing bochs bochsbios cpmtools dosbox dosemu wine-stable
|
||||
|
||||
# Snap
|
||||
#for i in pycharm-community
|
||||
#do
|
||||
# snap install $i --classic
|
||||
#done
|
||||
|
||||
# Cleanup
|
||||
sudo apt-get autoremove
|
||||
sudo apt-get clean
|
||||
|
||||
# Tweaks
|
||||
git config --global user.email "nprobert@probestar.net"
|
||||
git config --global user.name "Neal Probert"
|
||||
git config --global credential.helper store
|
||||
56
sbin/neal-setup
Executable file
56
sbin/neal-setup
Executable file
@ -0,0 +1,56 @@
|
||||
#!/bin/sh
|
||||
|
||||
# directories
|
||||
cd $HOME
|
||||
mkdir bin misc tmp Projects Gits
|
||||
|
||||
# ProbeStar stuff
|
||||
mkdir ProbeStar
|
||||
cd ProbeStar
|
||||
for i in Cnomicon CyberSecurity Database linux_tools Multimedia Pynomicon Radio Robotics
|
||||
do
|
||||
echo "ProbeStar: $i"
|
||||
if [ -d $i ]; then
|
||||
cd $i
|
||||
git pull
|
||||
git status
|
||||
cd ..
|
||||
else
|
||||
git clone https://www.probestar.com/PStar/$i
|
||||
fi
|
||||
cd ..
|
||||
ln -fs ProbeStar/$i
|
||||
cd ProbeStar
|
||||
done
|
||||
cd $HOME
|
||||
cp linux_tools/bin/* ~/bin
|
||||
|
||||
# NTCNA stuff
|
||||
cd $HOME
|
||||
mkdir NTCNA
|
||||
cd NTCNA
|
||||
for i in CVehicle NissanV2X PyVehicle ProberN
|
||||
do
|
||||
echo "NTCNA: $i"
|
||||
if [ -d $i ]; then
|
||||
cd $i
|
||||
git pull
|
||||
cd ..
|
||||
else
|
||||
git clone https://www.probestar.com/NTCNA-TP/$i
|
||||
fi
|
||||
done
|
||||
cd $HOME
|
||||
for i in CVehicle NissanV2X PyVehicle ProberN
|
||||
do
|
||||
ln -fs NTCNA/$i $i
|
||||
done
|
||||
|
||||
exit 0
|
||||
|
||||
# Google
|
||||
#cd Downloads
|
||||
#echo "Google Chrome"
|
||||
#wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
||||
#sudo dpkg -i google-chrome-stable_current_amd64.deb
|
||||
#sudo apt-get -f install
|
||||
3
sbin/net-up
Executable file
3
sbin/net-up
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
ifconfig eth0:0 192.168.1.90 netmask 255.255.255.0 up
|
||||
5
sbin/pstar-tunnel
Executable file
5
sbin/pstar-tunnel
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
COMMAND="ssh -p 2829 -N -f -R 10.1.1.11:2945:localhost:22 babylon5.probestar.com"
|
||||
pgrep -f -x "$COMMAND" > /dev/null 2>&1 || $COMMAND
|
||||
|
||||
7
sbin/python-updates
Executable file
7
sbin/python-updates
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Pip
|
||||
sudo -H pip3 install --upgrade pip
|
||||
|
||||
# Python3
|
||||
sudo -H pip3 install --upgrade pyserial numpy pyasn1 matplotlib pyside2 scapy virtualenv virtualenvwrapper
|
||||
40
sbin/server-setup
Executable file
40
sbin/server-setup
Executable file
@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
|
||||
ver=`uname -r`
|
||||
echo "Build packages:"
|
||||
sudo apt-get install -y build-essential
|
||||
#sudo apt-get install -y linux-headers
|
||||
sudo apt-get install -y linux-headers-$ver
|
||||
echo
|
||||
|
||||
# Must have
|
||||
echo "Essentials:"
|
||||
sudo apt-get install -y --ignore-missing git subversion subversion-tools openssh-server imagemagick bc flip tcpdump zip unzip netcat
|
||||
echo
|
||||
|
||||
echo "Network:"
|
||||
sudo apt-get install -y --ignore-missing net-tools chkrootkit denyhosts secure-delete hashdeep netcat socat cryptcat dsniff etherape socat tcpdump tshark
|
||||
echo
|
||||
|
||||
#echo "Virtual:"
|
||||
#sudo apt-get install -y --ignore-missing docker docker.io qemu qemu-kvm qemu-launcher qemu-user qemu-system qemu-utils virtualbox virtualbox-guest-additions-iso
|
||||
#echo
|
||||
|
||||
echo "==========="
|
||||
|
||||
# Development
|
||||
echo "C/C++ Development:"
|
||||
sudo apt-get install -y --ignore-missing libboost-dev libgd-dev libgd2-dev libgd2-xpm-dev libmuparser-dev libmysqlclient-dev libxml2-dev xutils-dev libbz2-dev libkml-dev liburiparser-dev libpopt-dev libpcap-dev libsodium-dev mingw-w64 clang diffutils patch ctags radare2 autoconf
|
||||
echo
|
||||
|
||||
echo "32 bit Development"
|
||||
sudo apt-get install -y --ignore-missing libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
|
||||
echo
|
||||
|
||||
echo "Cryptography:"
|
||||
sudo apt-get install -y --ignore-missing codecrypt libsodium-dev libcrypto++-dev
|
||||
echo
|
||||
|
||||
# Cleanup
|
||||
sudo apt-get autoremove
|
||||
sudo apt-get clean
|
||||
11
sbin/service-close
Executable file
11
sbin/service-close
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
if test $# -eq 0; then
|
||||
echo usage: $( basename $0 ) service ... 1>&2
|
||||
exit 1
|
||||
fi
|
||||
while test $# -ne 0; do
|
||||
/usr/sbin/iptables -D INPUT -p tcp --dport "$1" -j ACCEPT
|
||||
/usr/sbin/iptables -D INPUT -p udp --dport "$1" -j ACCEPT
|
||||
shift
|
||||
done
|
||||
|
||||
11
sbin/service-open
Executable file
11
sbin/service-open
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
if test $# -eq 0; then
|
||||
echo usage: $( basename $0 ) service ... 1>&2
|
||||
exit 1
|
||||
fi
|
||||
while test $# -ne 0; do
|
||||
/usr/sbin/iptables -A INPUT -p tcp --dport "$1" -j ACCEPT
|
||||
/usr/sbin/iptables -A INPUT -p udp --dport "$1" -j ACCEPT
|
||||
shift
|
||||
done
|
||||
|
||||
11
sbin/silent-running
Executable file
11
sbin/silent-running
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
iptables -P FORWARD DROP
|
||||
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
|
||||
iptables -A INPUT -i lo -j ACCEPT
|
||||
iptables -A INPUT -p icmp -m icmp --icmp-type 3 -j ACCEPT
|
||||
iptables -A INPUT -p icmp -m icmp --icmp-type 11 -j ACCEPT
|
||||
iptables -A INPUT -p icmp -m icmp --icmp-type 4 -j ACCEPT
|
||||
iptables -A INPUT -p icmp -m icmp --icmp-type 12 -j ACCEPT
|
||||
iptables -A INPUT -p tcp -m tcp ! --tcp-flags FIN,SYN,RST,ACK SYN -m state --state NEW -j DROP
|
||||
iptables -P INPUT DROP
|
||||
|
||||
6
sbin/ssh-babylon5-setup
Executable file
6
sbin/ssh-babylon5-setup
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# SSH
|
||||
ssh-keygen
|
||||
ssh-copy-id -i ~/.ssh/id_rsa.pub -p 2829 neal@babylon5.probestar.com
|
||||
|
||||
13
sbin/swap-increase
Executable file
13
sbin/swap-increase
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -f /swapfile ]; then
|
||||
echo "Increasing /swapfile size"
|
||||
swapoff /swapfile
|
||||
rm /swapfile
|
||||
fallocate -l 16G /swapfile
|
||||
chmod 600 /swapfile
|
||||
mkswap /swapfile
|
||||
swapon /swapfile
|
||||
else
|
||||
echo "No /swapfile!"
|
||||
fi
|
||||
Reference in New Issue
Block a user