Skip to content

Instantly share code, notes, and snippets.

View maartendamen's full-sized avatar

Maarten Damen maartendamen

View GitHub Profile
import-module ActiveDirectory
# Configuration
$tenantId = '' ### Paste your tenant ID here
$appId = '' ### Paste your Application ID here
$appSecret = '' ### Paste your Application secret here
$skiplist = "" # Specifcy items as a list: "SERVER1","SERVER2","SERVER3"
$mailserver = "mailserver.host.com" # Mailserver (SMTP)
$from_address = "from@host.com" # From address
$to_address = "to@host.com" # To address
@maartendamen
maartendamen / defender_crosscheck.ps1
Last active August 10, 2021 09:50
PowerShell script for cross checking Active Directory and Defender 365 inventory.
import-module ActiveDirectory
# Configuration
$tenantId = '' ### Paste your tenant ID here
$appId = '' ### Paste your Application ID here
$appSecret = '' ### Paste your Application secret here
# Start of script
$resourceAppIdUri = 'https://api.securitycenter.microsoft.com'
$oAuthUri = "https://login.microsoftonline.com/$TenantId/oauth2/token"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@maartendamen
maartendamen / onkyo.py
Created November 6, 2012 20:16
Onkyo eISCP Test
from twisted.internet.protocol import ClientFactory
from twisted.protocols.basic import LineReceiver
from twisted.internet import reactor
from struct import pack, unpack
INPUTS = {'00' : 'VCR/DVR',
'01' : 'CBL/SAT',
'02' : 'GAME',
'03' : 'AUX',
'05' : 'PC',