Skip to content

Instantly share code, notes, and snippets.

View tijme's full-sized avatar
:octocat:
I offer code 'n stuff, in exchange for some premium quality kudos!

Tijme Gommers tijme

:octocat:
I offer code 'n stuff, in exchange for some premium quality kudos!
View GitHub Profile
@tijme
tijme / pfx2john.py
Created June 7, 2023 18:51
Python3 version of `pfx2john.py` from John the Ripper
#!/usr/bin/env python
# coding: utf-8
"""
Modified for JtR by Dhiru Kholia in July, 2016
Copyright (c) 2015 Will Bond <will@wbond.net>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
@tijme
tijme / DriverObject->MajorFunction.txt
Created January 8, 2023 10:55
DriverObject MajorFunction offsets
Name Array index from 0x0 Func index from 0x0 Array index from 0x70 Func index from 0x70
------------------------------- ---------------------- --------------------- ----------------------- ----------------------
IRP_MJ_CREATE 0x0, 0 0x0, 0 0x70, 112 0x70, 112
IRP_MJ_CREATE_NAMED_PIPE 0x1, 1 0x8, 8 0x71, 113 0x78, 120
IRP_MJ_CLOSE 0x2, 2 0x10, 16 0x72, 114 0x80, 128
IRP_MJ_READ 0x3, 3 0x18, 24 0x73, 115 0x88, 136
IRP_MJ_WRITE 0x4, 4 0x20, 32 0x74, 116 0x90, 144
IRP_MJ_QUERY_INFORMATION 0x5, 5 0x28, 40 0x75, 117 0x98, 152
IRP_MJ_SET_INFORMATION 0x6, 6 0x30, 48
@tijme
tijme / Get-AllADGroupUsersRecursively.ps1
Last active February 20, 2023 11:52
This function will return all domain users in the specified group, including recursive memberships. This also includes users in special groups such as the "Domain Users" group. Users are part of special groups via the SID instead of the members attribute. Therefore `Get-ADGroupMembers -Recursive` doesn't return users in these special groups.
Function Get-AllADGroupUsersRecursively {
<#
.SYNOPSIS
This script will identify all AD users in a specific group recursively (including special groups such as "Domain Users").
.DESCRIPTION
This script will identify all AD users in a specific group recursively (including special groups such as "Domain Users").
.NOTES
Name: Get-AllADGroupUsersRecursively
@tijme
tijme / Get-EffectiveNetworkShareAccess.ps1
Created May 26, 2021 20:12
Get the effective network share access for a specific domain user. Identify which ACL entry/rule matches for the given or current user.
Function Get-EffectiveNetworkShareAccess {
<#
.SYNOPSIS
This script will identify why a certain user has access to a network share.
.DESCRIPTION
This script will identify why a certain user has access to a network share.
.NOTES
Name: Get-EffectiveNetworkShareAccess
@tijme
tijme / generate-iso-image.py
Last active November 20, 2024 20:46
Generate an ISO image/file using Python on Windows
# pip install pycdlib
try:
from cStringIO import StringIO as BytesIO
except ImportError:
from io import BytesIO
import pycdlib
iso = pycdlib.PyCdlib()
@tijme
tijme / ChangeSpellCheckingLanguage.vba
Created September 30, 2020 07:13
Macro to change the language of an entire PowerPoint presentation (including speaker notes)
Option Explicit
Public Sub ChangeSpellCheckingLanguage()
Dim j As Integer, k As Integer, scount As Integer, fcount As Integer
scount = ActivePresentation.Slides.Count
For j = 1 To scount
fcount = ActivePresentation.Slides(j).Shapes.Count
For k = 1 To fcount
If ActivePresentation.Slides(j).Shapes(k).HasTextFrame Then
ActivePresentation.Slides(j).Shapes(k).TextFrame2.TextRange.LanguageID = msoLanguageIDEnglishUS
End If
@tijme
tijme / tw33t.py
Last active June 24, 2023 19:18
Steal Twitter credentials via Google Dorks!
#!/usr/bin/env python3
# pip install python-twitter
# pip install colored
# pip install google
import re
import urllib3
import twitter
import requests
@tijme
tijme / BiometricHelper.swift
Created November 27, 2019 18:18
Helper class for programmatically checking if `Face ID` or `Touch ID` are available.
//
// Raivo OTP
//
// Copyright (c) 2019 Tijme Gommers. All rights reserved. Raivo OTP
// is provided 'as-is', without any express or implied warranty.
//
// Modification, duplication or distribution of this software (in
// source and binary forms) for any purpose is strictly prohibited.
//
// https://github.com/tijme/raivo/blob/master/LICENSE.md
@tijme
tijme / migrating_authy_to_raivo_otp.js
Last active August 15, 2019 08:57
Migrating Authy to Raivo OTP
/*! Based on https://gist.github.com/gboudreau/94bb0c11a6209c82418d01a59d958c93 */
/*! QRious v4.0.2 | (C) 2017 Alasdair Mercer | GPL v3 License
Based on jsqrencode | (C) 2010 tz@execpc.com | GPL v3 License */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.QRious=e()}(this,function(){"use strict";function t(t,e){var n;return"function"==typeof Object.create?n=Object.create(t):(s.prototype=t,n=new s,s.prototype=null),e&&i(!0,n,e),n}function e(e,n,s,r){var o=this;return"string"!=typeof e&&(r=s,s=n,n=e,e=null),"function"!=typeof n&&(r=s,s=n,n=function(){return o.apply(this,arguments)}),i(!1,n,o,r),n.prototype=t(o.prototype,s),n.prototype.constructor=n,n.class_=e||o.class_,n.super_=o,n}function i(t,e,i){for(var n,s,a=0,h=(i=o.call(arguments,2)).length;a<h;a++){s=i[a];for(n in s)t&&!r.call(s,n)||(e[n]=s[n])}}function n(){}var s=function(){},r=Object.prototype.hasOwnProperty,o=Array.prototype.slice,a=e;n.class_="Nevis",n.super
@tijme
tijme / NotificationHelper.swift
Last active May 25, 2019 18:57
Notification/observer helper for Swift. It allows you to e.g. only listen to (observe) a notification once.
//
// NotificationHelper.swift
// Raivo
//
// Created by Tijme Gommers on 24/05/2019.
// Copyright © 2019 Tijme Gommers. All rights reserved.
//
import Foundation