Skip to content

Instantly share code, notes, and snippets.

@AlLongley
AlLongley / scrcpy_ffplay.py
Last active October 5, 2023 14:34
Android screen viewing Python client to "scrcpy"
'''
Connect to an existing, ADB forwarded Android "scrcpy" session
and pipe the video stream into FFPlay
https://github.com/Genymobile/scrcpy/
'''
import socket
import struct
import sys
# Sets tcp_outgoing_address in squid.conf to point to IP of ppp0
# Ensure the line tcp_outgoing_address already exists in squid.conf!
# Crontab set up to reconnect Mac OS VPN like so:
# */1 * * * * networksetup -connectpppoeservice "VPN"; ~/SCRIPTS/SetProxyIP.sh;
export VPNIP=''
CONFDIR=/usr/local/etc/squid.conf
for i in 1 2 3 4 5; do
# -*- coding: future_fstrings -*-
import os
import traceback
import sys
import time
import select
import itertools
from concurrent import futures
from sumoappclient.sumoclient.base import BaseCollector
from sumoappclient.omnistorage.factory import ProviderFactory
@AlLongley
AlLongley / update_gcloud_dns.py
Last active February 3, 2020 01:34
Update Google Cloud DNS records
import time
import requests
from google.cloud import dns
# Expecting auth already run in environnment
# export GOOGLE_APPLICATION_CREDENTIALS="~/secretkey.json"
# stolen from https://googleapis.dev/python/google-api-core/latest/auth.html
client = dns.Client(project='YOURPROJECTNAME')
# Custom history configuration
# Run script using:
# chmod u+x better_history.sh
# sudo su
# ./better_history.sh
GLOBALRC = /etc/bashrc
echo ">>> Starting"
echo ">>> Loading configuration into $GLOBALRC"
echo "HISTTIMEFORMAT='%F %T '" >> $GLOBALRC
{
"logs": [
"5a3f1f1a-065f-44bd-97b0-fb19960e5311",
"8a36de7e-667d-4a2a-b51e-9ddcb0e650a1",
"4d140f0c-db87-4cd3-a6be-84dc6876e355",
"b8580328-15e3-4bda-b7bb-181502e03eba"
],
"statistics": {
"cardinality": 0,
"granularity": 0,
import glob
#AppData\Local\Google\Chrome\User Data\Default\shared_proto_db\*"
logfiles = glob.glob("*.ldb")
logfiles.extend(glob.glob("*.log"))
for fname in logfiles:
with open(fname,'rb') as fd:
ldbfile = fd.read()
downloads=[]
for entry in ldbfile.split(b'21_download,')[1:]:
@AlLongley
AlLongley / wat_5.zip
Last active February 13, 2021 05:18
Notepad++ LNK bomb
<?php phpinfo() ?>
Write-Host EXPLOITED