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 | |
# | |
# This program retrives and update a certain file according to a URI. In other | |
# words, the URI is fetched and, if the content of that file is different, the | |
# new content is written into that file. | |
# | |
# | |
# MIT License | |
# | |
# Copyright (c) 2017 José Lopes |
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 | |
#vsdbatch.py | |
''' | |
vsdbatch | |
Exports multiple Visio files in batch. | |
REQUIREMENTS | |
1. Python 3.6 -- and pip3 |
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
''' | |
Moves and renames files according to their modification dates. | |
source directory has a structure like: | |
SOX-old | |
+ dir1 | |
+ file1 | |
+ dir2 | |
+ file1 |
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 | |
'''HWg-STEpy is a simple script to get STE info. | |
This script takes advantage of HWg-STE's XML interface | |
to retrieve temperature and humidity information, then | |
print them on the screen. | |
To use this, first edit the `devices' variable below to | |
include the IP addresses of your STE devices, then run: |
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
'''Sets Windows' proxy configurations easily. | |
This script allows user to update Windows proxy settings easily, | |
by using predefined values assigned to proxies identified by | |
keywords. | |
Note that it'll also refresh your system to guarantee that all | |
settings take effect. Although in the tests it seemed unnecessary | |
(Windows 8.1), it's considered just a guarantee. |
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 | |
from sys import argv | |
from urllib.parse import quote | |
from urllib.request import Request, urlopen | |
from urllib.error import HTTPError | |
from json import loads | |
from time import sleep | |
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/ksh | |
#honeyd-syslogger.sh | |
# | |
# Parses honeyd logfiles to syslog and sends them to a SIEM. | |
# This script is compatible with OpenBSD 6.4 and ksh. If | |
# you're running in Linux/Bash, the commands below should help: | |
# | |
# YESTERDAY="$(date -u +"%Y-%m-%d" -d "yesterday")" | |
# | |
# Deploy: simply edit global variables according to your |
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 | |
'''Squid Cleaner | |
This script takes a file with a list of domains in Squid format | |
separated by "comma-space" and outputs a new list without | |
duplicates, shadows (.domain.com and domain.com <-removes this), | |
and overlaps (.domain.com, sub.domain.com <-removes this). | |
It can also check is domains are responsive, but of course this |
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 | |
import re | |
import logging | |
from imaplib import IMAP4_SSL | |
from email import message_from_bytes | |
from email.parser import HeaderParser | |
from email.header import decode_header, make_header | |
from email.utils import parsedate_to_datetime, localtime |
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 | |
# | |
# Simple examples on using different block cipher modes | |
# of operation (NIST SP 800-38A) with AES. | |
# | |
# Warning: this script is just an example! You must be | |
# very confident on your work (or insane) to implement | |
# this kind of code in production, because it's safer | |
# to use wide tested frameworks like PyNaCl. | |
# |