Skip to content

Instantly share code, notes, and snippets.

View guerrilladynamicsinc's full-sized avatar

Guerrilla Dynamics guerrilladynamicsinc

View GitHub Profile
@guerrilladynamicsinc
guerrilladynamicsinc / updatehome.sh
Last active December 21, 2022 19:41
update gotak home ip tabs
#!/bin/bash
echo "10.241.108.112" > oldztip.txt
echo "192.168.0.132" > oldip.txt
# Set the LAN IP
ZT_IFACE=`ip -o link show | awk '{print $2}' | sed 's/://' | grep zt | tail -n1`
ZTIP=`ip addr show $ZT_IFACE | grep 'inet ' | awk '{print $2}' | awk '{$0=substr($0,1,length($0)-3)}1'`
OLDZTIP=`cat oldztip.txt`
OLDIP=`cat oldip.txt`
LAN=`ip -4 addr show eth0 | grep inet | awk '{print $2}' | cut -d'/' -f1`
@guerrilladynamicsinc
guerrilladynamicsinc / rtsp-simple-server.yml
Created December 21, 2022 06:06
fts-rtsp-simple-server.yml
###############################################
# General parameters
# Sets the verbosity of the program; available values are "error", "warn", "info", "debug".
logLevel: info
# Destinations of log messages; available values are "stdout", "file" and "syslog".
logDestinations: [stdout]
# If "file" is in logDestinations, this is the file which will receive the logs.
logFile: rtsp-simple-server.log
@guerrilladynamicsinc
guerrilladynamicsinc / zerotier.sh
Last active December 21, 2022 05:56
zerotier forward script
#!/bin/bash
docker exec -it zerotier zerotier-cli join $1
sudo sysctl -w net.ipv4.ip_forward=1
sudo sysctl -w net.ipv4.ip_forward=1
PHY_IFACE=eth0; ZT_IFACE=`ip -o link show | awk '{print $2}' | sed 's/://' | grep zt | tail -n1`
SUBNET=`ip route | grep '^default' | awk '{print $3}' | awk '{sub(/.$/,"0")}1'`
ZTIP=`ip addr show $ZT_IFACE | grep 'inet ' | awk '{print $2}' | awk '{$0=substr($0,1,length($0)-3)}1'`
sudo iptables -t nat -A POSTROUTING -o $PHY_IFACE -j MASQUERADE
sudo iptables -A FORWARD -i $PHY_IFACE -o $ZT_IFACE -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i $ZT_IFACE -o $PHY_IFACE -j ACCEPT
###############################################
# General parameters
# Sets the verbosity of the program; available values are "error", "warn", "info", "debug".
logLevel: info
# Destinations of log messages; available values are "stdout", "file" and "syslog".
logDestinations: [stdout]
# If "file" is in logDestinations, this is the file which will receive the logs.
logFile: rtsp-simple-server.log
#find all bpi
sudo nmap -sP 192.168.0.0/24 | awk '/^Nmap/{ipaddress=$NF}/02:00:00/{print ipaddress}'
#find all rpi
sudo nmap -sP 192.168.0.0/24 | awk '/^Nmap/{ipaddress=$NF}/B8:27:EB/{print ipaddress}'
@guerrilladynamicsinc
guerrilladynamicsinc / gist:b5ea7633f23211a46d9dd945088c6df3
Last active September 8, 2022 03:12
Install FTS Docker on ARM64
#install docker
snap install docker #installs docker
#create persistent volume
sudo docker volume create fts_data #create persistent data volume
#install fts
sudo docker run --restart unless-stopped -d -v fts_data:/data --net=host -e TZ=America/New_York --env IP=0.0.0.0 --env MSG="FTS Docker" --name fts guerrilladynamics/freetakserver:1.9.8-arm-rtsp
#install mumble ptt
sudo docker run --restart unless-stopped -d --net host magicalex/mumble:latest
#install zerotier
snap install zerotier
adb shell svc power stayon true && scrcpy -S -m1920
@guerrilladynamicsinc
guerrilladynamicsinc / gist:9d8d506d7b1ca2fb32be1ad61d124c0d
Last active September 6, 2021 06:55
Live TAK Client IP Refresh
while true; do clear && echo "Connected TAK Clients:" && netstat -tunap | grep 8087 | awk '{print $5}' | cut -f1 -d":" | tail -n +2 && sleep 5; done