This file contains hidden or 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 asyncdispatch | |
| import asynctools/asyncdns | |
| type | |
| DNSQueryResult = ref object | |
| name: string | |
| error: bool | |
| ans: ptr AsyncAddrInfo |
This file contains hidden or 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
| #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> |
This file contains hidden or 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
| ## 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 |
This file contains hidden or 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
| /* | |
| * 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 | |
| */ |
This file contains hidden or 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
| $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 |
This file contains hidden or 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
| # | |
| # A bunch of MSSQL shortcuts | |
| # | |
| Import-Module Sqlps -DisableNameChecking | |
| function Get-Databases { | |
| Invoke-Sqlcmd -Query "sp_databases" | |
| } |
This file contains hidden or 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 | |
| # 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 | |
| # ¯\_(ツ)_/¯ |
This file contains hidden or 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/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 |
This file contains hidden or 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 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: |
This file contains hidden or 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 | |
| # 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 | |
| # |