This file contains 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
strftime('%d-%m-%Y %H:%M',datetime(timestamp/1000000+unixepoch("1601-01-01"), 'unixepoch', 'localtime')) |
This file contains 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 requests | |
import bs4 | |
import string | |
def get_names_starting_with(letter): | |
contents = requests.get(f"https://www.debijbel.nl/bijbelse-namen/bijbelse-namen-met-een-{letter}") | |
soup = bs4.BeautifulSoup(contents.text,'html.parser') | |
trs = soup.find_all("tr") | |
for tr in trs: | |
name = tr.td.strong.text |
This file contains 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
function Get-ProcessPipes{ | |
param( | |
[Parameter(Mandatory=$false)] | |
[string]$CSV, | |
[Parameter(Mandatory=$false)] | |
[switch]$All | |
) | |
Add-Type -TypeDefinition @" | |
using System; |
This file contains 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 <windows.h> | |
#pragma comment(lib,"User32") | |
void main() { | |
MessageBox(NULL, "Message", "Caption", MB_OK); | |
} |
This file contains 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
# run in ~/Library/Application Support/Firefox/Profiles/<profile> | |
import sqlite3 | |
url = "%<url>%" | |
con = sqlite3.connect("places.sqlite") | |
cur = con.cursor() | |
cur.execute("delete from moz_places where url LIKE :url;", (url,)) | |
cur.execute("delete from moz_origins where host like :url;", (url,)) | |
con.commit() |
This file contains 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
//Based on https://gist.github.com/materi/f5b95f798b9012e135e3462d52d33d4c | |
Java.perform(function() { | |
var res2 = Java.use('okhttp3.Response$Builder'); | |
var Buffer = Java.use('okio.Buffer'); | |
var peek_size = 1000 | |
var String = Java.use('java.lang.String'); | |
res2.build.implementation = function() { | |
var response = this.build(); | |
This file contains 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
/* Input example | |
Name: test | |
A: abc | |
B: def | |
Name: obj2 | |
A: xyz | |
B: abc | |
*/ |
This file contains 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
# DO NOT RUN THIS SCRIPT BLINDLY! | |
# This script provides functions to enumerate open ports and network security configurations (NSG) in Azure. | |
# Copy and paste snippets of the script to perform the tasks you need. | |
$ips = <local_ips> | |
$subscription = <subscription_id> | |
function IPInRange { | |
# https://github.com/omniomi/PSMailTools/blob/v0.2.0/src/Private/spf/IPInRange.ps1 | |
[cmdletbinding()] |
This file contains 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
setenforce 0 | |
echo creating new cacerts folder | |
mount -t tmpfs tmpfs /system/etc/security/cacerts | |
echo copying user cacerts to system cacerts | |
cp /data/misc/user/0/cacerts-added/* /system/etc/security/cacerts/ |
This file contains 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 requests | |
from collections import defaultdict | |
r = requests.get(url="https://korpershoek.me/srb2/highscores/api/highscores", verify=False) | |
data = r.json() | |
skins = defaultdict(int) | |
#three for first place, 2 for second, 1 for last, 0 otherwise | |
weights = { | |
1:15, | |
2:12, |
NewerOlder