Phison based flash drives have various modes that dictate how they operate;
- as a regular flash drive (mode 3)
- as a dual-volume flash drive (mode 7)
- as a single volume flash drive + cdrom (mode 21)
| // See <https://mazzo.li/posts/stopping-linux-threads.html> | |
| // for blog post. | |
| // | |
| // Spawns a thread with a server listening on 55555 UDP, and | |
| // then terminates it after 1 minute. | |
| // | |
| // I compile and run with | |
| // | |
| // clang++ -Wall -std=c++20 server.cpp -lpthread -o server && ./server | |
| // |
| key = [0x19, 0x86, 0x10, 0x18] | |
| with open('Chips.wdb', 'rb') as f: | |
| f.seek(0x2) | |
| date = f.readline() | |
| f.seek(0xE) | |
| magic = f.read(2) | |
| print("DB date: " + date.decode('utf-8')) | |
| print("DB magic: " + magic.decode('utf-8')) | |
| print("OK" if magic == b'WR' else "Invalid magic") |
| // ==UserScript== | |
| // @name @chaoticvibing Twitter Blue red ticks - twitter.com | |
| // @namespace Violentmonkey Scripts | |
| // @match *://*.twitter.com/* | |
| // @grant none | |
| // @version 1.5.2 | |
| // @author @chaoticvibing - GH @busybox11, modified by @arturo182 | |
| // @description 11/9/2022, 11:45:28 PM | |
| // @updateURL https://gist.githubusercontent.com/arturo182/85251cbc370a12d9de6766dd44b88d5c/raw/twitterblue-red.user.js | |
| // @downloadURL https://gist.githubusercontent.com/arturo182/85251cbc370a12d9de6766dd44b88d5c/raw/twitterblue-red.user.js |
| javascript:void(function() { | |
| loc = window.location; | |
| page_title = window.document.title; /* create page */ | |
| w = window.open("", "_blank", "height=150,width=900"); | |
| d = w.document; | |
| d.open(); | |
| d.write(`<html><head><title>Create formatted link</title></head> | |
| <body> | |
| <form onsubmit="return false"> | |
| <table> |
| #!/usr/bin/env python3 | |
| # Needs: Python 3.5+, Flask, PyCryptoDome | |
| # server.pem, rsapubkey.pem + rsaprivkey.pem (1024-bit) in the current directory | |
| # | |
| # What it does: | |
| # Pretends to be the "CT-KIP" web service (https://tools.ietf.org/html/rfc3948) that | |
| # RSA SecurID Token for Windows v5.0.x talks to to set up a new token, using an | |
| # authentication code. | |
| # |
| #!/bin/bash | |
| # | |
| # This script takes one or more x509 certificates in .PEM format (from | |
| # stdin or files listed on command line) and adds helpful "bag | |
| # attributes" before each certificate. This makes it easier for | |
| # humans to identify the contents of the bundle. | |
| # | |
| # Requires (g)awk and openssl's x509 command line utility. | |
| # | |
| # Output fields included can be specified via openssl-x509 options: |
The purpose of this short howto is to show you how to:
openconnect [1] to connect to an enterprise cisco anyconnect endpointUsually VPN administrators will puth the default route to the users, so that all user traffic is routed through the vpn connection. This is to address the various security concerns around compromised user computers bridging external internet traffic into the secure VPN network.
While the VPN administrator can push routes to the clients, the client can ignore these default routes and establish client side routing so that only the required A.B.C.D/E network is routed through the VPN. All other traffic will still use the clients default route and default outbound internet connection.
| #!/usr/bin/env python | |
| #encoding:utf8 | |
| #=============================================================================== | |
| # | |
| # FILE: simg2img.py | |
| # | |
| # USAGE: ./simg2img.py system.img | |
| # | |
| # DESCRIPTION: | |
| # |
| curl --include \ | |
| --no-buffer \ | |
| --header "Connection: Upgrade" \ | |
| --header "Upgrade: websocket" \ | |
| --header "Host: example.com:80" \ | |
| --header "Origin: http://example.com:80" \ | |
| --header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \ | |
| --header "Sec-WebSocket-Version: 13" \ | |
| http://example.com:80/ |