Skip to content

Instantly share code, notes, and snippets.

@mattweidner
mattweidner / fix-elk-log4j.sh
Created December 23, 2021 16:37 — forked from jdratlif/fix-elk-log4j.bash
bash script to update elasticsearch and logstash log4j to 2.16.0 to address log4shell vulnerability
#! /bin/bash
if [[ -z $ELK ]]; then
ELK="elasticsearch"
fi
if [[ $ELK = "elasticsearch" ]]; then
LOG4J_PATH="/usr/share/elasticsearch"
elif [[ $ELK = "logstash" ]]; then
LOG4J_PATH="/usr/share/logstash"
@mattweidner
mattweidner / license-badges.md
Created August 9, 2018 21:17 — forked from lukas-h/license-badges.md
License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • Badges are made with Shields.io.
  • This badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.  
  • 🇫🇷 Cette liste en français
  • Github has a new autodetection of the LICENSE file, which shows up the license at the repo overview
@mattweidner
mattweidner / private_fork.md
Created July 24, 2018 16:16 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@mattweidner
mattweidner / meraki_strongswan_notes.md
Created March 16, 2018 07:09 — forked from psanford/meraki_strongswan_notes.md
connect to meraki client vpn from strongswan (ubuntu 16.04 edition)

These are my notes for connecting to a meraki client vpn from ubuntu 16.04. This configuration assumes you are using a psk for the ipsec auth.

Install the following packages:

apt-get install -y strongswan xl2tpd

Configure strong swan

@mattweidner
mattweidner / findelevate.py
Created May 26, 2017 04:58 — forked from riyazwalikar/findelevate.py
Python script to find all Windows binaries with autoElevate=True (uses sigcheck obviously)
# Usage: findelevate.py C:\Windows\System32\
# Needs sigcheck.exe in path [https://technet.microsoft.com/en-us/sysinternals/bb897441.aspx]
import sys
import os
import glob
import subprocess
if len(sys.argv) < 2:
print "Usage: findelevate.py <PATH>"
@mattweidner
mattweidner / namemash.py
Created June 9, 2016 16:15 — forked from superkojiman/namemash.py
Creating a user name list for brute force attacks.
#!/usr/bin/env python
import sys
if __name__ == "__main__":
if len(sys.argv) != 2:
print "usage: %s names.txt" % (sys.argv[0])
sys.exit(0)
for line in open(sys.argv[1]):
name = ''.join([c for c in line if c == " " or c.isalpha()])
#!/usr/bin/ruby
# Source characters array
range = [*'0'..'9',*'A'..'Z',*'a'..'z']
puts "#{range}"
# Build a 20 char random string from the source array.
a = Array.new(20) { range.sample }.join
puts "#{a}"