Skip to content

Instantly share code, notes, and snippets.

@blark
blark / oktapussy.sh
Last active Dec 22, 2019
Making an OktaPussy ROM for Amiga
View oktapussy.sh
#!/bin/bash
# Download and decompress the prerequisite files and put them in the directory with this script:
#
# 1. "OKT612.ROM"
# "Oktagon 2008 SCSI Controller 6.12 ROM 27256"
# http://kickstart.ddns.net/Hardware-Software%20Amiga/Hardware/Rom%20Archive/romwebby/okt612.rar
#
# 2. "at" (OktaPussy/Expansion/at):
# http://aminet.net/disk/misc/oktapus.lha
#
@blark
blark / byteswap.py
Created Dec 10, 2019
A quick and dirty Python 3 script to byteswap an Amiga ROM
View byteswap.py
#!/usr/bin/env python3
import argparse
parser = argparse.ArgumentParser(description="Byteswap an Amiga 500 ROM file")
parser.add_argument("infile", type=str, help="the ROM file to convert")
parser.add_argument("outfile", type=str, help="filename to output")
args = parser.parse_args()
with open(args.infile, "rb") as f:
@blark
blark / gencert.py
Created May 23, 2019 — forked from toolness/gencert.py
Python script to create server SSL certs and sign them with a custom CA.
View gencert.py
#! /usr/bin/python
"""
This simple script makes it easy to create server certificates
that are signed by your own Certificate Authority.
Mostly, this script just automates the workflow explained
in http://www.tc.umn.edu/~brams006/selfsign.html.
Before using this script, you'll need to create a private
View forcefully_remove_mdm_1013.sh
#!/bin/bash
# Seriously there still apparently aren't enough warning labels
# If you don't understand the consequences don't do it
# ################
# #### May cause 10.13.2+ machines that were DEP-enrolled to not be considered as such
# ################
# but really, you shouldn't do this
# one local user enabled for MDM come on apple
# ¯\_(ツ)_/¯
View SQL-Shortcuts.ps1
#
# A bunch of MSSQL shortcuts
#
Import-Module Sqlps -DisableNameChecking
function Get-Databases {
Invoke-Sqlcmd -Query "sp_databases"
}
@blark
blark / gist:a21f9677196f137506a082ad379e5edd
Last active Jul 12, 2018
Powershell to Convert disk to StandardSSD_LRS in Azure
View gist:a21f9677196f137506a082ad379e5edd
$diskName = 'yourDiskName'
$rgName = 'yourResourceGroupName'
$storageType = 'StandardSSD_LRS'
$disk = Get-AzureRmDisk -DiskName $diskName -ResourceGroupName $rgName
# Get parent VM resource
$vmResource = Get-AzureRmResource -ResourceId $disk.ManagedBy
# Stop and deallocate the VM before changing the storage type
View SharpPick.cs
/*
* SharpPick aka InexorablePoSH
* Description: Application to load and run powershell code via the .NET assemblies
* License: 3-Clause BSD License. See Veil PowerTools Project
*
* This application is part of Veil PowerTools, a collection of offensive PowerShell
* capabilities. Hope they help!
*
* This is part of a sub-repo of PowerPick, a toolkit used to run PowerShell code without the use of Powershell.exe
*/
@blark
blark / arc4.nim
Last active Jan 2, 2019
An implementation of ARC4 for Nim
View arc4.nim
## Nim implementation of ARC4 stream cipher
## https://en.wikipedia.org/wiki/RC4
## http://www.users.zetnet.co.uk/hopwood/crypto/scan/cs.html#RC4
import future
type ARC4* = object
S: seq[int]
keystream: iterator(S: var seq[int]): int
@blark
blark / async_dns.c
Created Jan 17, 2018 — forked from mopemope/async_dns.c
c-ares example
View async_dns.c
#include <ares.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netdb.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
@blark
blark / asyncdns_test.nim
Created Jan 15, 2018
Asynchronous DNS requests with Nim
View asyncdns_test.nim
import asyncdispatch
import asynctools/asyncdns
type
DNSQueryResult = ref object
name: string
error: bool
ans: ptr AsyncAddrInfo