Skip to content

Instantly share code, notes, and snippets.

View obsti8383's full-sized avatar

obsti8383 obsti8383

View GitHub Profile
@obsti8383
obsti8383 / md5_compare.py
Last active November 16, 2019 16:49
Compare two md5sum files (needs to be same filename format) and prints out which file have been changed/removed/added (example: python3 md5_compare.py oldmd5s.md5 newmd5s.md5))
#!/usr/bin/python3
import sys
def prRed(output): print("\033[91m{}\033[00m".format(output))
if len(sys.argv) < 3:
print("Not enough arguments. Need two files to compare (old first, new last).")
exit(1)
if len(sys.argv) > 3:
print("Too many arguments. Need two files to compare only (old first, new last).")
@obsti8383
obsti8383 / Get-AdGroupMembershipChange.ps1
Last active February 10, 2017 18:43 — forked from anonymous/Get-AdGroupMembershipChange.ps1
Detect Changes to AD Group Members and Notify on Change
#requires -Module ActiveDirectory
<#
.SYNOPSIS
This script queries multiple Active Directory groups for new members in a domain. It records group membership
in a CSV file in the same location as the script is located. On the script's initial run it will simply record
all members of all groups into this CSV file. On subsequent runs it will query each group's member list and compare
that list to what's in the CSV file. If any differences are found (added or removed) the script will update the
CSV file to reflect current memberships and notify an administrator of which members were either added or removed.
.NOTES