Skip to content

Instantly share code, notes, and snippets.

@floyd-fuh
floyd-fuh / repackage_apk_for_burp.py
Last active June 6, 2025 16:09
Automatically repackage an Android apk and resign it for usage with Burp Proxy
#!/usr/bin/env python3
import sys
if not sys.version.startswith('3'):
print('\n[-] This script will only work with Python3. Sorry!\n')
exit()
import subprocess
import os
@ahbanavi
ahbanavi / encryption.php
Last active October 24, 2025 23:38
Encrypt / Decrypt JSON data between Python and PHP using AES 256 GCM
<?php
const PASSPHRASE = ''; // use 'openssl rand -hex 32' to generate key, same with python
function encrypt(array $data): string
{
$data_json_64 = base64_encode(json_encode($data));
$secret_key = hex2bin(PASSPHRASE);
$iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-gcm'));
$tag = '';
$encrypted_64 = openssl_encrypt($data_json_64, 'aes-256-gcm', $secret_key, 0, $iv, $tag);
@pvanfas
pvanfas / Awesome Python.md
Last active November 15, 2025 22:03
A curated list of awesome Python frameworks, libraries, software and resources.
@Bad3r
Bad3r / Private_File_Sharing_Services.md
Last active December 19, 2025 11:41
Private File Sharing Services

Centralized File Sharing


Site Size Limit API Clearnet Mirrors Tor Mirrors Online
GoFile.io No Limit API N/A
@royshil
royshil / ffmpeg_concat_xfade.py
Last active March 31, 2025 18:31
A video concatenation tool based on FFMPEG with crossfade between the segments (with the `xfade` filter)
#!/usr/local/bin/python3
import argparse
import subprocess
import itertools
parser = argparse.ArgumentParser(description='Concatenate videos with FFMPEG, add "xfade" between segments.')
parser.add_argument('--segments_file', '-f', metavar='Segments file', type=str, nargs=1,
help='Segments text file for concatenating. e.g. "segments.txt"')
var pljssglobal = [];
var pljssglobalid;
if (window['PlayerjsAsync']) {
setTimeout(PlayerjsAsync, 1)
};
function Playerjs(options) {
var o = {
play: false,
audiosrc: [],
@Orizzu
Orizzu / itemClicked.py
Last active November 25, 2023 18:48
qlistwidget item clicked event pyqt
# you can copy paste and run this code for test
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
import sys
class window(QMainWindow):
def __init__(self):
super(window, self).__init__()
listWidget = QListWidget()
listWidget.resize(300,120)
@ESWZY
ESWZY / compress_video.py
Last active November 27, 2025 05:42
An example Python code for compressing video file to target size.
# Simplified version and explanation at: https://stackoverflow.com/a/64439347/12866353
import os
import ffmpeg
def compress_video(video_full_path, size_upper_bound, two_pass=True, filename_suffix='cps_'):
"""
Compress video file to max-supported size.
:param video_full_path: the video you want to compress.
:param size_upper_bound: Max video size in KB.