Skip to content

Instantly share code, notes, and snippets.

View andreztz's full-sized avatar
🔌
High tech, low life.

André P. Santos andreztz

🔌
High tech, low life.
View GitHub Profile
@andreztz
andreztz / socat.py
Created July 18, 2024 22:29 — forked from andyneff/socat.py
Python script to emulate socat behavior, but uses a single executable instead of one per connection
#!/usr/bin/env python
import os
import sys
from subprocess import Popen, PIPE
from socket import *
import atexit
from select import select
from logging import getLogger, basicConfig
@andreztz
andreztz / pyforw.py
Created July 18, 2024 22:29 — forked from staaldraad/pyforw.py
Python script to create a Connect-Connect tunnel. For those times ncat/socat can't be put on the box and python is available..
#!/usr/bin/python
"""
Python script to create a Connect-Connect tunnel. For those times ncat/socat can't be put on the box and python is available..
Author: Etienne Stalmans <etienne@sensepost.com>
Version: 1.0 (22_01_2015)
Usage: python pyforw.py <targetIP> <targetPort> <jumpbox> <jumpboxPort>
python pyforw.py 10.1.1.1 3389 179.0.0.100 8081
"""
from socket import *
@andreztz
andreztz / ffmpeg.md
Created June 22, 2024 21:44 — forked from liangfu/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

@andreztz
andreztz / httpsrv.py
Created May 2, 2024 20:42 — forked from darkr4y/httpsrv.py
python simple http server with upload & download
#!/usr/bin/env python
"""Extend Python's built in HTTP server to save files
curl or wget can be used to send files with options similar to the following
curl -X PUT --upload-file somefile.txt http://localhost:8000
wget -O- --method=PUT --body-file=somefile.txt http://localhost:8000/somefile.txt
__Note__: curl automatically appends the filename onto the end of the URL so
@andreztz
andreztz / delete-likes-from-twitter.md
Created April 19, 2024 18:04 — forked from aymericbeaumet/delete-likes-from-twitter.md
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andreztz
andreztz / gpu-passthrough.md
Created December 2, 2023 01:26 — forked from MaxXor/gpu-passthrough.md
Arch GPU Passthrough Summary

Arch Linux GPU-Passthrough

A quick guide on how to setup a GPU-Passthorugh. Below are some of my Resources

The Arch Wiki is the goto place for additional information and performance tweaks like CPU-Pinning.

Requirements

  • IGPU or second dedicated GPU for Host system (unless you want to go the hard way and use one GPU for HOST and GUEST)
@andreztz
andreztz / get_youtube_id.py
Created November 9, 2023 22:16 — forked from silentsokolov/get_youtube_id.py
Python: get youtube id
# Get youtube id
#http://youtu.be/5Y6HSHwhVlY
#http://www.youtube.com/embed/5Y6HSHwhVlY?rel=0
#http://www.youtube.com/watch?v=ZFqlHhCNBOI
regex = re.compile(r'(https?://)?(www\.)?(youtube|youtu|youtube-nocookie)\.(com|be)/(watch\?v=|embed/|v/|.+\?v=)?(?P<id>[A-Za-z0-9\-=_]{11})')
match = regex.match(self.youtube_url)
@andreztz
andreztz / mpv.conf
Created October 10, 2023 10:26 — forked from doole/mpv.conf
Configuration file for `mpv`
#
# mpv configuration file
#
# See the CONFIGURATION FILES section in the man page
# for a detailed description of the syntax.
#
# Profiles should be placed at the bottom of the configuration file to ensure
# that settings wanted as defaults are not restricted to specific profiles.
#
# Note that the commented example options usually do _not_ set the default
@andreztz
andreztz / install_dig.sh
Created August 20, 2023 09:05 — forked from miguelmota/install_dig.sh
Arch linux install dig command
yay -S bind-tools
dig