Skip to content

Instantly share code, notes, and snippets.

@keyboardcrunch
keyboardcrunch / pydocexec.py
Created April 30, 2020 02:24
Injects a python script inside a word document so the doc can be executed with python :)
#!/usr/bin/python3
import sys
import os
import zipfile
import tempfile
from xml.etree import ElementTree
from shutil import copyfile
def stuffer(py_file, doc_file):
@pklaus
pklaus / analyseBreakinAttempts.sh
Last active September 20, 2022 10:32
A script that analyses the log files /var/log/auth.log* for illegal break-in attempts and writes all output to $logdir – Check http://blog.philippklaus.de/2010/02/analyse-illegal-ssh-login-attempts/
#!/bin/bash
# This script analyses the log files /var/log/auth.log* for
# illegal break-in attempts and writes all output to $logdir.
# <http://blog.philippklaus.de/2010/02/analyse-illegal-ssh-login-attempts/#comment-12211>
# inspired by <http://goo.gl/QMOhiU>
# and <http://filipivianna.blogspot.com/2009/10/checking-authlog-for-ssh-brute-force.html>
logbasedir=~/logs