Skip to content

Instantly share code, notes, and snippets.

View GitHub30's full-sized avatar
🌴
On vacation

GitHub30

🌴
On vacation
  • Osaka, Japan
View GitHub Profile
@GitHub30
GitHub30 / decryptchromecookies.py
Last active May 29, 2024 11:25
Simple Decrypt Chrome/Firefox Cookies File (Python 3) - Windows
import sqlite3
def get_chrome_cookies(db=None):
import json
from base64 import b64decode
from win32.win32crypt import CryptUnprotectData # pip install pywin32
# should use Cryptodome in windows instead of Crypto
# otherwise will raise an import error
from Cryptodome.Cipher.AES import new, MODE_GCM # pip install pycryptodomex
@JohnLaTwC
JohnLaTwC / examples.txt
Last active January 13, 2025 18:22
comsvcs MiniDump examples
By @JohnLaTwC
References:
https://risksense.com/blog/hidden-gems-in-windows-the-hunt-is-on/ by Jenna Magius and Nate Caroe (@RiskSense)
https://modexp.wordpress.com/2019/08/30/minidumpwritedump-via-com-services-dll/
https://twitter.com/SBousseaden/status/1407742041170268166 - Calling MiniDump export by ordinal examples: (comsvcs,#24)
Detection Examples:
"C:\Windows\System32\rundll32.exe" C:\Windows\System32\comsvcs.dll MiniDump <PID> \Windows\Temp\<filename>.dmp full
using namespace Windows.Storage
using namespace Windows.Graphics.Imaging
using namespace System.IO.WindowsRuntimeStreamExtensions
using namespace System.IO.WindowsRuntimeStreamExtensions
using namespace System.Text
using namespace System.Text.Json
# Add the WinRT assembly, and load the appropriate WinRT types
Add-Type -AssemblyName System.Runtime.WindowsRuntime
@valinet
valinet / toast1.c
Created December 21, 2020 19:22
Send a toast notification in Windows 10 using plain C
// Send toast notifications in Windows 10, using Windows Runtime,
// without any language projection, in PLAIN C
// Copyright (c) 2021 Valentin - Gabriel Radu
//
// MIT License
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this softwareand associated documentation files(the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and /or sell
// copies of the Software, and to permit persons to whom the Software is
@satetsu888
satetsu888 / modify.py
Created November 28, 2020 14:00
ポケモンシールホルダーキャンペーン用の工作
from mitmproxy import http
SCRIPT = '''
<script>
const constraints = {
audio: false,
video: {
width: 150,
height: 300,
facingMode: "environment"
@atoonk
atoonk / AWS_v4prefixes.md
Last active May 10, 2025 21:52
AWS prefixes

Summary

Total number of IPv4 addresses: 100,750,168. That’s the equivalent of just over six /8’s Also see this blog: https://toonk.io/aws-and-their-billions-in-ipv4-addresses/

just for fun, let's put a value number on that

Total value at, $20 per IP: => $2,015,003,360

Total value at, $25 per IP: => $2,518,754,200

const dfd = require("danfojs-node")
const tf = require("@tensorflow/tfjs-node")
async function load_process_data() {
let df = await dfd.read_csv("https://web.stanford.edu/class/archive/cs/cs109/cs109.1166/stuff/titanic.csv")
//A feature engineering: Extract all titles from names columns
let title = df['Name'].apply((x) => { return x.split(".")[0] }).values
//replace in df
df.addColumn({ column: "Name", value: title })
@weibeld
weibeld / 01-hello-world.yml
Last active April 25, 2025 15:00
GitHub Actions example workflow 1 — Hello World!
name: hello-world
on: push
jobs:
my-job:
runs-on: ubuntu-latest
steps:
- name: my-step
run: echo "Hello World!"
@tiagocoutinho
tiagocoutinho / tcp_bridge.py
Last active August 13, 2023 19:39
Simple TCP bridge in python
"""
requirements:
$ pip install click
run with:
$ python tcp_proxy --listen=:5000 --connect=192.168.1.100:5000
"""
import socket
@traut
traut / static-http-receiver.py
Created May 20, 2020 07:49
Static HTTP server in Python that saves all POST requests as files in the current directory
import os
from http.server import HTTPServer, BaseHTTPRequestHandler, SimpleHTTPRequestHandler
class CustomHTTPRequestHandler(SimpleHTTPRequestHandler):
def do_POST(self):
filename = os.path.basename(self.path)
file_length = int(self.headers['Content-Length'])
with open(filename, 'wb') as output_file: