Skip to content

Instantly share code, notes, and snippets.

@blark
blark / BLEKey.ipynb
Created July 29, 2016 02:12
A quick and dirty Jupyter notebook to convert BLEKey data to cards.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@blark
blark / PowerView-3.0-tricks.ps1
Created June 18, 2017 12:12 — forked from HarmJ0y/PowerView-3.0-tricks.ps1
PowerView-3.0 tips and tricks
# PowerView's last major overhaul is detailed here: http://www.harmj0y.net/blog/powershell/make-powerview-great-again/
# tricks for the 'old' PowerView are at https://gist.github.com/HarmJ0y/3328d954607d71362e3c
# the most up-to-date version of PowerView will always be in the dev branch of PowerSploit:
# https://github.com/PowerShellMafia/PowerSploit/blob/dev/Recon/PowerView.ps1
# New function naming schema:
# Verbs:
# Get : retrieve full raw data sets
# Find : ‘find’ specific data entries in a data set
@blark
blark / init.vim
Last active October 7, 2017 19:02
nvim configuration
" Notes to make this all work
" ---------------------------
"
" 1) vim-plug - follow the directions at https://github.com/junegunn/vim-plug
" 2) a powerline patched font, I recommend this one https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/Meslo/M-DZ/complete
" the OTF file will be fine, you don't need all the files in that dir, just choose one
" 3) a truecolour capable terminal like iTerm or Terminator ... or remove the
" settings $NVIM_TUI_ENABLE_TRUE_COLOR and set termguicolors below
" 4) to install all the plugins below once this file is in place run :PlugUpdate
@blark
blark / krb5_ccache.py
Created November 23, 2017 14:01 — forked from cluther/krb5_ccache.py
Python module for reading krb5 credential cache files.
#!/usr/bin/env python
##############################################################################
#
# Copyright (C) Zenoss, Inc. 2013, all rights reserved.
#
# This content is made available according to terms specified in
# License.zenoss under the directory where your Zenoss product is installed.
#
##############################################################################
@blark
blark / vmware-fingerprint.nse
Last active December 5, 2017 20:41
Nmap script that returns VMWare version info
local http = require "http"
local shortport = require "shortport"
local stdnse = require "stdnse"
description = [[
Uses an HTTP PUT request to VMware's SOAP API in order to elicit a server response that contains ESX version information.
]]
---
--@usage
@blark
blark / asyncdns_test.nim
Created January 15, 2018 21:04
Asynchronous DNS requests with Nim
import asyncdispatch
import asynctools/asyncdns
type
DNSQueryResult = ref object
name: string
error: bool
ans: ptr AsyncAddrInfo
@blark
blark / async_dns.c
Created January 17, 2018 13:32 — forked from mopemope/async_dns.c
c-ares example
#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 / SharpPick.cs
Created February 21, 2018 19:09 — forked from bneg/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 / gist:a21f9677196f137506a082ad379e5edd
Last active July 12, 2018 20:11
Powershell to Convert disk to StandardSSD_LRS in Azure
$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
#
# A bunch of MSSQL shortcuts
#
Import-Module Sqlps -DisableNameChecking
function Get-Databases {
Invoke-Sqlcmd -Query "sp_databases"
}