ssh -R 22222:localhost:22 server_user@server -p PORT
socat TCP-LISTEN:22223,fork,bind=0.0.0.0 TCP:localhost:22222
ssh local_user@server -p 22223
import os | |
import subprocess | |
import xml.etree.ElementTree as ET | |
import traceback | |
def get_repo_paths_and_names(manifest_path): | |
"""Parses the given repo manifest file to extract repository paths and names. | |
Args: | |
manifest_path (str): Path to the repo manifest file (.xml). |
/* ==UserStyle== | |
@name habr.com | |
@version 20240410.12.23 | |
@namespace ? | |
==/UserStyle== */ | |
@-moz-document domain("habr.com") { | |
body, | |
html { | |
background-color: #181818; | |
color-scheme: dark; |
import argparse | |
import code | |
import errno | |
import getpass | |
import os | |
import re | |
import time | |
from io import BytesIO | |
from PIL import Image | |
from base64 import b64decode |
""" | |
A simple example of recording audio from speakers and streaming over RTSP protocol. | |
Requires pyaudiowpatch and RTSP server, e.g. https://github.com/bluenviron/mediamtx | |
""" | |
import pyaudiowpatch as pyaudio | |
import subprocess | |
import time | |
import wave |
import argparse | |
import numpy as np | |
from PIL import Image | |
from moviepy.editor import * | |
import os | |
import errno | |
TARGET_WIDTH = 1920 | |
TARGET_HEIGHT = 1080 | |
TARGET_FPS = 24 |
#include <Windows.h> | |
#include <wlanapi.h> | |
#include <iostream> | |
#pragma comment(lib, "wlanapi.lib") | |
typedef DWORD(WINAPI* P_WlanOpenHandle)(DWORD, PVOID, PDWORD, PHANDLE); | |
typedef DWORD(WINAPI* P_WlanCloseHandle)(HANDLE, PVOID); | |
typedef DWORD(WINAPI* P_WlanHostedNetworkStartUsing)(HANDLE, PWLAN_HOSTED_NETWORK_REASON, PVOID); | |
typedef DWORD(WINAPI* P_WlanHostedNetworkStopUsing)(HANDLE, PWLAN_HOSTED_NETWORK_REASON, PVOID); |
import cv2 | |
from PIL import Image | |
import numpy as np | |
def cv2_estimate_dx_dy(prev_filename, curr_filename): | |
""" | |
Calculates dx and dy using OpenCV script for two consecutive frames | |
""" | |
# Load the previous and current frames | |
prev_frame = cv2.imread(prev_filename, cv2.IMREAD_GRAYSCALE) |
ssh -R 22222:localhost:22 server_user@server -p PORT
socat TCP-LISTEN:22223,fork,bind=0.0.0.0 TCP:localhost:22222
ssh local_user@server -p 22223
from time import time | |
import av | |
import cv2 | |
import numpy as np | |
from PIL import Image | |
from SSIM_PIL import compare_ssim | |
# Load reference image and get its dimensions | |
ref_img = cv2.imread("preroll_end2_cropped.png") | |
ref_height, ref_width, _ = ref_img.shape |
import os | |
import shutil | |
import subprocess | |
import tempfile | |
from pwnlib.log import getLogger | |
log = getLogger(__name__) | |
def _run(cmd, stdin = None): |