Skip to content

Instantly share code, notes, and snippets.

@BSN32
BSN32 / dumpOnlyfilledArea.txt
Last active November 20, 2023 13:09
Get only filled areas image with DD
Dikte sadece dolu alanı almak için:
rootfs:
512Mbyte * 1024Kb *1024 Byte
Bootloader:
16Mbyte * 1024Kb *1024 Byte
== 553648128 bytes
@BSN32
BSN32 / dataclean.txt
Last active November 5, 2023 09:05
Data Cleaning with Linux Tools
TASK 1 : Get Clean Azire VPN Wireguard Servers Domains
https://www.azirevpn.com/docs/servers
```
#####
CA Toronto ca-tor.azirevpn.net UDP 1 to 51820
DK Copenhagen dk-cph.azirevpn.net UDP 1 to 51820
FI Helsinki fi-hel.azirevpn.net UDP 1 to 51820
FR Paris fr-par.azirevpn.net UDP 1 to 51820
DE Frankfurt de-fra.azirevpn.net UDP 1 to 51820
@BSN32
BSN32 / sshscp_to_multiple_hosts.txt
Last active October 11, 2023 11:26
Read IP hosts from ip.txt and execute ssh and scp through them
# Read IP hosts from ip.txt and iterate through them
# send "executable" file over ssh and do some stuff
while IFS= read -r dest; do
if scp -P8787 -O -oHostKeyAlgorithms=+ssh-rsa executable "root@$dest:/tmp/."; then
echo "Success fw transfer: $dest"
fi
if ssh -n -oHostKeyAlgorithms=+ssh-rsa "root@$dest" -p22 'mv /tmp/executable /root/executable && chmod +x /root/executable && ls -lah /root/executable'; then
echo "Success: $dest"
sleep 1
@BSN32
BSN32 / MYSQL
Created September 15, 2023 13:42
# Default 100 if you access this limit you will be blocked
SHOW VARIABLES LIKE 'max_connect_errors';
+--------------------+-------+
| Variable_name | Value |
+--------------------+-------+
| max_connect_errors | 100 |
+--------------------+-------+
1 row in set (0.00 sec)
# increase the limits (think about what you done)
@BSN32
BSN32 / Linux STUN Tools to Characterize NAT Behavior
Created June 26, 2023 10:27
Get information about NAT type and behavior
sudo apt-get install stun
sudo stun stun.callwithus.com 0
# output
STUN client version 0.97
running test number 0
Primary: Independent Mapping, Port Dependent Filter, preserves ports, no hairpin
Return value is 0x000017
## without ssh passwd
sudo wireshark -k -i <(ssh [email protected] -p 22 tcpdump -s 0 -U -n -w - -i igb3 host 192.168.30.114 and not tcp port 22)
## with password
mkfifo /tmp/test.pcapng
chmod +wr /tmp/test.pcapng
sudo wireshark -k -i /tmp/test.pcapng &
ssh [email protected] -p 22 tcpdump -s 0 -U -n -w - -i igb3 host 192.168.30.114 and not tcp port 22 > /tmp/test.pcapng
@BSN32
BSN32 / MTU_improvements.txt
Last active June 8, 2023 11:26
Fix MTU problems..
### Ping tool
## LINUX ##
#prohibit fragmentation even local one
ping -s 1462 -M do 195.175.39.49
#do PMTU discovery, fragment locally when packet size is large
ping -s 1472 -M want 195.175.39.49
=========================================