Skip to content

Instantly share code, notes, and snippets.

from itertools import permutations
from itertools import product
from sys import exit
from time import sleep
import os
result = os.system('color') ## Allows the script to use colors
GREEN = '\033[92m'
RED = '\033[31m'
@ghost-ng
ghost-ng / newtornode
Last active December 19, 2020 15:32
newtornode
Append to {shell}rc file
alias newtornode='echo -n "[*] Current TOR Node: ";curl --socks5 127.0.0.1:9050 http://checkip.amazonaws.com/;echo "[*] Getting New TOR Node";(echo authenticate "\"thisismypassword\""; echo signal newnym; echo quit) | nc localhost 9051 >/dev/null;sleep 5;echo -n "[+] New TOR Node: ";curl --socks5 127.0.0.1:9050 http://checkip.amazonaws.com/'
@ghost-ng
ghost-ng / http-server.py
Created December 19, 2020 15:34
Simple python http server with upload and encryption
#!/usr/bin/env python3
"""Python Web Server with upload functionality and SSL.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
For initial version, see: https://gist.github.com/UniIsland/3346170
Updated by midnightseer to include the ssl wrapper and command line options
@ghost-ng
ghost-ng / tcpforward.pl
Created December 20, 2020 20:25
perl port forwarder
#!/usr/bin/perl
use Fcntl;
use Errno;
use IO::Socket::INET;
use Pod::Usage qw/pod2usage/;
use warnings;
use strict;
our $VERSION = 0.01;
@ghost-ng
ghost-ng / tcpforward.py
Created December 26, 2020 22:18
Python port forwarder tcp
import socket
import threading
import sys
import argparse
import os
def handle(buffer):
return buffer
#!/bin/bash
#author: midnightseer
#location: https://gist.github.com/MidnightSeer/99f42947b41b9f51a1b15107ba8d5c07
#resources:
#https://www.exploit-db.com/exploits/50236
#https://www.exploit-db.com/papers/44139/
#https://github.com/mysqludf/lib_mysqludf_sys <-- this is the udf file I used
#!/usr/bin/env python
from __future__ import print_function
# Originally Taken From:
# https://raw.githubusercontent.com/Alamot/code-snippets/master/mssql/mssql_shell.py
# CHANGES:
# 1. I removed upload functionality - too clunky and depending on how you access the target, it can get complicated,
# also I strongly prefer to not use certuti if I don't have to. The user should alread know how to get files onto the system
# 2. I added script arguments (I opted to not use argparse)
# 3. I added support for different ports
# 4. I removed unnecessary imports
#!/usr/bin/python
from socket import *
import sys
bufsize = 1024 # Modify to suit your needs
try:
listenHost = sys.argv[1].split(":")[0]
listenPort = int(sys.argv[1].split(":")[1])
connectHost = sys.argv[2].split(":")[0]
@ghost-ng
ghost-ng / tcpforward.go
Last active January 1, 2022 15:52
tcpforward.go
package main
import (
"fmt"
"io"
"log"
"net"
"os"
"github.com/akamensky/argparse"
@ghost-ng
ghost-ng / Service KMS
Created August 29, 2022 21:24 — forked from judero01col/Service KMS
Volume License Activation Key Service - KMS
## Find Available Target Editions
DISM.exe /Online /Get-TargetEditions
## Convert Server Standard 2019 Evaluation to Server Standard 2019
DISM /online /Set-Edition:ServerStandard /ProductKey:N69G4-B89J2-4G8F4-WWYCC-J464C /AcceptEula
## How To Activate
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
slmgr /skms [server]:[port]
slmgr /ato