Skip to content

Instantly share code, notes, and snippets.

View minimike86's full-sized avatar
🎥
twitch.tv/msec

MSec minimike86

🎥
twitch.tv/msec
View GitHub Profile
from collections import deque
from anytree import Node
# Create the tree with parent-child relationships
tree = Node("1", children=[
Node("2", children=[Node("4")]),
Node("3", children=[Node("5"), Node("6")])
])
def print_levels(root):
@minimike86
minimike86 / jg-service.service.ts
Created January 29, 2021 11:09
Nice little undocumented feature in GetFundraisingPageDonations (https://api.justgiving.com/docs/resources/v1/Fundraising/GetFundraisingPageDonations) that you need to use query strings (?pageSize=${pageSize}&pageNumber=${pageNumber}) to use the pagination... Also RxJS is the best
getFundraisingPageDonations(pageSize: number, pageNumber: number): Observable<FundraisingPageDonations> {
return this.http.get<FundraisingPageDonations>(jgEnvironment.justgiving.baseUri +
`/fundraising/pages/${jgEnvironment.justgiving.pageShortName}/donations?pageSize=${pageSize}&pageNumber=${pageNumber}`,
jgEnvironment.justgiving.httpOptions);
}
getAllJustGivingDonations(): Observable<JustGivingDonation[]> {
const justGivingDonations: JustGivingDonation[] = [];
// get first page
return this.getFundraisingPageDonations(150, 1).pipe(
function Invoke-ExcelMacroPivot{
<#
.AUTHOR
Matt Nelson (@enigma0x3)
.SYNOPSIS
Pivots to a remote host by using an Excel macro and Excel's COM object
.PARAMETER Target
Remote host to pivot to
.PARAMETER RemoteDocumentPath
Local path on the remote host where the payload resides
@minimike86
minimike86 / ExcelXLL.md
Created September 11, 2017 20:02 — forked from ryhanson/ExcelXLL.md
Execute a DLL via .xll files and the Excel.Application object's RegisterXLL() method

DLL Execution via Excel.Application RegisterXLL() method

A DLL can be loaded and executed via Excel by initializing the Excel.Application COM object and passing a DLL to the RegisterXLL method. The DLL path does not need to be local, it can also be a UNC path that points to a remote WebDAV server.

When delivering via WebDAV, it should be noted that the DLL is still written to disk but the dropped file is not the one loaded in to the process. This is the case for any file downloaded via WebDAV, and they are stored at: C:\Windows\ServiceProfiles\LocalService\AppData\Local\Temp\TfsStore\Tfs_DAV\.

The RegisterXLL function expects an XLL add-in which is essentially a specially crafted DLL with specific exports. More info on XLL's can be found on MSDN

The XLL can also be executed by double-clicking the .xll file, however there is a security warning. @rxwx has more notes on this here inc