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 | |
import sys | |
import os | |
from cryptography import x509 | |
from cryptography.hazmat.backends import default_backend | |
import pem | |
from datetime import datetime | |
try: |
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/python2 | |
# coding: utf8 | |
import sys | |
import re | |
import imaplib | |
import smtplib | |
from getpass import getpass | |
user = raw_input('Username: ') |
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 | |
set -eu | |
if [ $# -ne 1 ]; then | |
echo "usage: $0 dhcp.conf" | |
exit 1 | |
fi | |
[ -f $1 ] || { echo "$1 does not exist" ; exit 2; } | |
DOMAIN="my.domain.local" |
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 python3 | |
#coding: utf-8 | |
from bs4 import BeautifulSoup | |
import mechanize | |
import re | |
br = mechanize.Browser() | |
br.addheaders = [('User-agent', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0')] | |
response = br.open("http://www.radiofono.gr/live?city_id=9") |
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
def getLdapAttribute(uid, attribute): | |
import sys | |
SERVER=ldapserver.example.com | |
PORT=636 | |
BIND_DN='uid=binder,dc=example,dc=com' | |
BIND_PW='changeme' | |
baseDN = "dc=example,dc=com" | |
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' |
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/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
#!/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
#!/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} |
OlderNewer