Some notes, tools, and techniques for reverse engineering macOS binaries.
| import sys | |
| HELP = """ | |
| python3 algorithm1.py -h | |
| show this very help page | |
| python3 algorithm1.py | |
| work out what's special about 495 | |
| python3 algorithm1.py <number> | |
| run the algorithm on <number> | |
| """ |
| "xkcd scream cipher implementation" | |
| import string | |
| As = ['\u0041', '\u00c0', '\u00c1', '\u00c2', '\u00c3', '\u00c4', '\u00c5', '\u0100', '\u0102', '\u0104', '\u01cd', '\u01de', '\u01e0', '\u01fa', '\u0200', '\u0202', | |
| '\u0226', '\u023a', '\u1e00', '\u1ea0', '\u1ea2', '\u1ea4', '\u1ea6', '\u1ea8', '\u1eaa', '\u1eac', '\u1eae', '\u1eb0', '\u1eb2', '\u1eb4', '\u1eb6' | |
| ] | |
| letters = [c for c in ',.()-'] + [c for c in string.ascii_lowercase] | |
| def encrypt(s: str) -> str: | |
| r = '' |
| import cv2 | |
| import pygame | |
| import numpy | |
| import functools | |
| # WHAT IS THIS? | |
| # This script is a simple ascii video player made in Python / pygame | |
| # It allows you to drop in videos, or to use the webcam | |
| pygame.init() |
| #define BINARY_REFINEMENT 1 | |
| #define BINARY_COUNT 4 | |
| #define BINARY_DECREASE 0.5 | |
| vec3 diagonal(mat4 mat) { return vec3(mat[0].x, mat[1].y, mat[2].z); } | |
| vec3 projectionOrthogonal(mat4 mat, vec3 v) { return diagonal(mat) * v + mat[3].xyz; } | |
| vec3 viewToScreen(vec3 viewPos) { | |
| return (projectionOrthogonal(gbufferProjection, viewPosition) / -viewPosition.z) * 0.5 + 0.5; | |
| } |
If you hate git submodule, then you may want to give git subtree a try.
When you want to use a subtree, you add the subtree to an existing repository where the subtree is a reference to another repository url and branch/tag. This add command adds all the code and files into the main repository locally; it's not just a reference to a remote repo.
When you stage and commit files for the main repo, it will add all of the remote files in the same operation. The subtree checkout will pull all the files in one pass, so there is no need to try and connect to another repo to get the portion of subtree files, because they were already included in the main repo.
Let's say you already have a git repository with at least one commit. You can add another repository into this respository like this:
| set-itemproperty -path "HKCU:Control Panel\Desktop" -name WallPaper -value accipiter.png |