This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace DiabloHorn.PowerShell.ParseCommandLine | |
{ | |
/* | |
https://powershell.one/powershell-internals/parsing-and-tokenization/simple-tokenizer | |
https://learn.microsoft.com/en-us/powershell/scripting/developer/hosting/windows-powershell01-sample?view=powershell-7.4 | |
*/ | |
using System; | |
using System.Collections.ObjectModel; | |
//dotnet add package System.Management.Automation (inside folder with .csproj) | |
using System.Management.Automation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example minimalistic plugin framework | |
# https://www.guidodiepen.nl/2019/02/implementing-a-simple-plugin-framework-in-python/ | |
import logging | |
class BasePlugin(object): | |
""" | |
Example class just to remember about logging stuff | |
We want to override the default formatting of the main logger, | |
without removing it alltogether |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Thank you @donnymaasland for this file | |
# memo to self: | |
# sudo docker-compose up | |
version: "3" | |
services: | |
elasticsearch: | |
image: elasticsearch:7.6.2 | |
ports: | |
- 9200:9200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ gcc -g minimal.c -o minimal | |
❯ sudo gdb minimal | |
Password: | |
(gdb) break main | |
Breakpoint 1 at 0x100000f90: file minimal.c, line 3. | |
(gdb) run | |
Starting program: /private/tmp/c-repl/minimal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#DiabloHorn - https://diablohorn.com | |
#easy opengrok analysis of all decompiled source | |
# sudo docker run -v /home/me/Desktop/libanalysis/srces:/src -p 9000:8080 itszero/opengrok | |
# http://localhost:9000/source/ | |
OUTPUTDIR="srces" | |
DECOMPATH="/home/me/tools/javadecomp" | |
DECOMBIN="cfr_0_130.jar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#DiabloHorn - https://diablohorn.com | |
#Find whitelisted IP addresses on a network & application level | |
import sys | |
import logging | |
import threading | |
import argparse | |
from scapy.all import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import java.io.*; | |
import java.security.*; | |
public class ChangePassword | |
{ | |
private final static JKS j = new JKS(); | |
public static void main(String[] args) throws Exception | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#DiabloHorn - https://diablohorn.com | |
import sys | |
import os | |
import csv | |
import argparse | |
import shutil | |
try: | |
import magic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- Mode: makefile -*- | |
BUILD_DIR?=$(CURDIR)/.. | |
include ../config-host.mak | |
include config-target.mak | |
include config-devices.mak | |
include $(SRC_PATH)/rules.mak | |
$(call set-vpath, $(SRC_PATH):$(BUILD_DIR)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# DiabloHorn https://diablohorn.com | |
# blank out bytes taking into account the PE file format | |
# input file: base64 malware.exe | rev > enc.txt | |
import sys | |
import os | |
#pip install pefile | |
import pefile | |
import argparse | |
import logging |
NewerOlder