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 / UITextViewPlaceholder.swift
Last active January 7, 2024 03:06
The correct way to implement a placeholder in a UITextView (Swift)
//
// UITextViewPlaceholder.swift
// TextViewPlaceholder
//
// Copyright (c) 2017 Tijme Gommers <tijme@finnwea.com>
//
// 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 the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@tijme
tijme / ethereum-contract-scam.sol
Last active January 5, 2024 04:07
An example of an Ethereum smart contract used by scammers.
pragma solidity ^0.4.23;
contract NumberBetweenZeroAndTen {
uint256 private secretNumber;
uint256 public lastPlayed;
address public owner;
struct Player {
address addr;
@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 / generate-iso-image.py
Last active September 18, 2023 20:07
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 / 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 / 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 / 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 / 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 / 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