This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from base64 import b64encode, b64decode | |
from playwright.sync_api import sync_playwright | |
def exec_instruction(instruction): | |
instruction = b64decode(instruction)[1:-1] | |
if instruction == b"END": | |
page.evaluate(f"ws.send('{b64encode(bytes(f'{sum(registers)}', 'utf8')).decode()}')") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# "Borrowed" from https://github.com/pymupdf/PyMuPDF/discussions/1855 | |
import sys | |
import argparse | |
from pathlib import Path | |
import pymupdf | |
parser = argparse.ArgumentParser( | |
prog="watermark-remover", |