This file contains hidden or 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
''' | |
Reads all secret-scanning findings from GitHub and outputs them in a JSON file. | |
Author: Joe Lopes <lopes.id> | |
Date: 2025-05-24 | |
License: MIT | |
Usage: | |
- A GitHub Fine Grained Personal Access Token (FGPAT) with sufficient permissions to read | |
secret scanning findings |
This file contains hidden or 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
''' | |
Cleans up lines in the reference lists in Chronicle SIEM with expired dates. | |
This script can be used to clean up some or all Reference Lists in Chronicle SIEM. | |
It scans each list and removes expired lines with the same pattern it is set to | |
monitor. Lines outside this pattern are just ignored. The pattern is: | |
<value> // expires:YYYY-MM-DD | |
This file contains hidden or 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 | |
#moth.py | |
''' | |
Convert Kindle or O'Reilly annotations to JSON or Markdown format. | |
Usage: | |
moth.py -i <input> -o <output> [-s <source>] [-f <format>] | |
Example: |
This file contains hidden or 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
# Product: MISP Threat Intelligence | |
# Category: Information Security | |
# Supported Format: JSON | |
# Reference: https://medium.com/@thatsiemguy/how-to-integrate-misp-and-chronicle-siem-9e5fe5fde97c | |
# Last Updated: 2024-06-01 | |
filter { | |
## | |
# BASIC VARIABLES ASSERTION AND FIELDS EXTRACTION | |
# |
This file contains hidden or 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/python3 | |
''' | |
Monitors some log files and send new entries to syslog. | |
This script requires a config file to import paths to the files. | |
The main concept is that there are a repository with log files | |
(which I call 'source files') and an auxiliary repository of | |
files ('working files'). | |
The idea here is to create a copy of source files in the work | |
directory, then calculating the diff between the source files |
This file contains hidden or 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. | |
# |
This file contains hidden or 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 hidden or 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 hidden or 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 bash | |
# | |
# The MIT License (MIT) | |
# Copyright (c) 2016 José Lopes de Oliveira Jr. | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a | |
# copy of this software and associated documentation files (the "Software"), | |
# to deal in the Software without restriction, including without limitation | |
# the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
# and/or sell copies of the Software, and to permit persons to whom the |
This file contains hidden or 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 hashlib import md5 | |
from base64 import b64decode | |
from base64 import b64encode | |
from Crypto.Cipher import AES | |
# Padding for the input string --not | |
# related to encryption itself. | |
BLOCK_SIZE = 16 # Bytes | |
pad = lambda s: s + (BLOCK_SIZE - len(s) % BLOCK_SIZE) * \ |
NewerOlder