Skip to content

Instantly share code, notes, and snippets.

@fredericmohr
fredericmohr / win-srv-logon-history.ps1
Last active June 2, 2022 10:55
Windows Server PS: Security Log Logon/Logoff Event Reporter
# Source: https://gallery.technet.microsoft.com/Log-Parser-to-Identify-8aac36bd
# Authors: Ryan DeVries, Drew Bonasera, Scott Smith
# Rochester Institute of Technology - Computer System Forensics
# Variables
# Reads the hostname, sets to the local hostname if left blank
$hostname = read-host "Enter the IP or hostname of the computer you wish to scan (Leave blank for local)"
if ($hostname.length -eq 0){$hostname = $env:computername}
# Reads the start date, sets to 1/1/2000 if left blank
@fredericmohr
fredericmohr / SimpleHTTPServerWithUpload.py
Created October 9, 2021 16:20 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
The following procedure prevents mysql passwords from showing up in your mysql or bash history.
### Create random password
// create random password with openssl
$ openssl rand -base64 32 | head -c 16
wZw0USspr+eTKFNQ
// create random password with python (more complex)
$ python -c "import string;from random import choice; print ''.join([choice(string.ascii_letters + string.digits + string.punctuation) for i in range(16)])"
lD#':_7vxZZW7Sm!
@fredericmohr
fredericmohr / lastpass-sharing-anleitung.md
Last active December 14, 2017 14:13
LastPass Sharing-Keys Erstellen

Generating Sharing-Keys in LastPass

Deutsche Weboberfläche

Nach der Erstellung eines LastPass-Account muss ein Sharing-Key erstellt werden, um Passwörter mit anderen teilen oder von anderen geteilte Passwörter annehmen zu können. Klicken Sie auf Weitere Optionen im unteren, linken Eck des Bildschirms und anschließend auf Zu teilenden Schlüssel generieren, um einen Sharing-Key zu erstellen.

generate-keys-de1

Anschließend wird ein Popup mit dem Hinweis gezeigt, dass der Vorgang ein paar Minuten dauern kann. Über Passwort erstellen wird der Vorgang gestartet.

generate-keys-de2

@fredericmohr
fredericmohr / keybase.md
Last active October 25, 2016 12:42
keybase verification

Keybase proof

I hereby claim:

  • I am fredericmohr on github.
  • I am fredericmohr (https://keybase.io/fredericmohr) on keybase.
  • I have a public key whose fingerprint is 5D13 D5DD 1CD0 F90F C012 298F 003B 3547 FD5E E8C2

To claim this, I am signing this object:

@fredericmohr
fredericmohr / Windows10-Setup.ps1
Created July 27, 2016 08:44 — forked from NickCraver/Windows10-Setup.ps1
(In Progress) PowerShell Script I use to customize my machines in the same way for privacy, search, UI, etc.
##################
# Privacy Settings
##################
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0