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
# | |
wget http://ftp.ntua.gr/pub/linux/centos/7.6.1810/isos/x86_64/CentOS-7-x86_64-Minimal-1810.iso | |
mkdir test | |
mkdir iso | |
mount -oloop CentOS-7-x86_64-Minimal-1810.iso iso | |
rsync -av iso/ test/ | |
umount iso | |
cd test | |
#sed -i '/rd.live.check quiet/a \\nlabel autoinstaller\n menu label autoinstaller\n menu default\n kernel vmlinuz\n append initrd=initrd.img ks=https://example.com/ks.cfg' isolinux/isolinux.cfg | |
#sed -i '/rd.live.check quiet/a \\nlabel autoinstaller\n menu label autoinstaller\n menu default\n kernel vmlinuz\n append initrd=initrd.img ks=hd:sdb1/ks.cfg' isolinux/isolinux.cfg |
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/sh | |
export PATH=/usr/local/sbin:/sbin:/usr/local/bin:/bin:/usr/sbin:/usr/bin | |
#DEBUG="echo" | |
DEBUG="" | |
set -eu # -x | |
TODAY=$(date +%Y-%m-%d) |
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/sh | |
# RUN THIS ON $ME | |
echo 1 > /proc/sys/net/ipv4/ip_forward | |
iptables -F | |
iptables -t nat -F | |
iptables -X |
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/sh | |
set -eu | |
export IFS=' | |
' | |
TO=$1 | |
for ID in $(grep to=\<"$1"\> /var/log/everything | awk '{print $6}'| tr -d : ); do |
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
mfs_load="YES" | |
mfs_type="mfs_root" | |
mfs_name="/mfsroot" | |
ahci_load="YES" | |
vfs.root.mountfrom="ufs:/dev/md0" | |
mfsbsd.autodhcp="YES" | |
autoboot_delay="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
#!/bin/bash | |
urldecode() { | |
arg="$1" | |
i="0" | |
while [ "$i" -lt ${#arg} ]; do | |
c0=${arg:$i:1} | |
if [ "x$c0" = "x%" ]; then | |
c1=${arg:$((i+1)):1} | |
c2=${arg:$((i+2)):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
#!/bin/sh | |
set -e | |
if [ -z $1 ]; then | |
echo "Usage: $0 file" | |
exit 1 | |
fi | |
OS=$(uname -s) |
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/env python | |
# coding: UTF-8 | |
# for openbsd dhcpd only | |
# apo dhcpd.leases(5): | |
# the last declaration is the current | |
# also, the times are in UTC! | |
import re | |
from datetime import datetime |
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
import requests | |
import re | |
import ipaddress | |
with requests.Session() as s: | |
r = s.get('https://support.zoom.us/hc/en-us/articles/201362683-Network-Firewall-or-Proxy-Server-Settings-for-Zoom%C2%A0%20') | |
zoom = list(set(re.findall(r'(?:\d{1,3}.){3}\d{1,3}\/\d{1,2}', r.text))) | |
#r = s.get('https://docs.microsoft.com/en-us/microsoft-365/enterprise/urls-and-ip-address-ranges?view=o365-worldwide#skype-for-business-online-and-microsoft-teams') | |
#teams = list(set(re.findall(r'(?:\d{1,3}.){3}\d{1,3}\/\d{1,2}', r.text))) |
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/local/bin/bash | |
export IFS=' | |
' | |
string=$1 | |
SED=gsed | |
gr='αάβγδεέζηήθιίϊΐκλμνξοόπρσςτυύϋΰφχψωώ' | |
eng='aavgdeezii.iiiiklmnxooprsstyyyyf..oo' |
NewerOlder