This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for i in 10.228.17.6 10.228.17.7 10.228.17.8 10.228.34.66 10.228.20.247 10.228.20.246 10.228.20.99 10.228.21.232 10.228.21.229 10.228.20.197 10.228.20.198 10.228.17.130 10.228.21.130 10.228.33.35 10.228.21.197 10.228.20.131 10.228.18.130 10.228.20.229 10.228.32.132 172.25.128.170 ; do /guifibages/bin/clients-rocket $i ; done | |
### MNBFBagesNord (10.228.17.7 AirOS v5.5.8) | |
Airmax | |
Name IP Priority Quality CCQ Signal Distance | |
MNRamonFarguel 10.228.17.163 None 52 98 -72.00 0.1Km | |
SFBPinedaRevol 10.228.17.196 None 56 99 -78.00 5.4Km | |
MNCanAlberti 10.228.17.208 None 61 99 -72.00 4.2Km |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create CA | |
openssl genrsa -out ca.key 4096 | |
openssl req -new -x509 -nodes -sha1 -days 1825 -key ca.key -out ca.crt | |
# Create Intermediate | |
openssl genrsa -out intermediate.key 4096 | |
openssl req -new -sha1 -key intermediate.key -out intermediate.csr | |
# CA signs Intermediate | |
openssl x509 -req -days 1825 -in intermediate.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out intermediate.crt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
[[ "$TRACE" ]] && { set -x; set -o functrace; } | |
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin | |
logfile="/tmp/$(basename $0).$$.log" | |
exec > >(tee -ia $logfile) | |
exec 2> >(tee -ia $logfile >&2) | |
is_root_user() { | |
# Function to check that the effective user id of the user running | |
# the script is indeed that of the root user (0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
sudo apt-get update | |
sudo apt-get install wine-stable ttf-mscorefonts-installer | |
sudo mkdir -p /opt/winbox/ | |
sudo wget https://mt.lv/winbox64 -O /opt/winbox/winbox.exe | |
sudo chmod 777 /opt/winbox -R | |
cat << EOF | sudo tee /opt/winbox/winbox.desktop | |
[Desktop Entry] | |
Version=1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name h135; | |
return 301 https://h135:8006; | |
} | |
server { | |
listen 443; | |
ssl on; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install openjdk-8-jdk openjdk-11-jdk snap | |
wget https://www.ubnt.com/downloads/tools/beta/discovery-tool/ubnt-discovery.zip | |
mkdir -p /opt/ubnt-discovery | |
sudo unzip ubnt-discovery.zip -d /opt/ubnt-discovery/ | |
touch /usr/bin/ubnt-discovery | |
echo -e "#!/bin/bash \n /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -jar /opt/ubnt-discovery/ubnt-discovery-v2.5.1.jar " > /usr/bin/ubnt-discovery |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Protocl CDP i LLDP | |
tcpdump '(ether[12:2]=0x88cc or ether[20:2]=0x2000)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: prova routers_commands | |
hosts: mikrotik | |
connection: network_cli | |
remote_user: guifibages | |
gather_facts: false | |
tasks: | |
- name: run command on remote devices | |
routeros_command: | |
commands: /system routerboard print |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import csv,ipaddress | |
with open('IPv4Address.csv', newline='') as csvfile: | |
data = list(csv.reader(csvfile)) | |
print(data[1][0]) | |
print(type(data)) | |
print(str(ipaddress.IPv4Address(3232235521))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from md5 import md5 | |
# header from 401 response on REGISTER | |
# Authorization: Digest username="883140776410950", realm="gw_youmagic", algorithm=MD5, uri="sip:GW_Youmagic", nonce="1476157437:0a1418a40f8ee1c9a55f1587ab931c14", response="3ff479ccc24874f66aae45dac889d099" | |
login = '883140776410950' | |
uri = 'sip:GW_Youmagic' | |
nonce = '1476157437:0a1418a40f8ee1c9a55f1587ab931c14' | |
realm = 'gw_youmagic' | |
password = '----------' |
OlderNewer