Building Linux 4.18 and Debugging the Kernel in VS Code
Building Linux 4.18 and Debugging the Kernel in VS Code1. Install the prerequisites12345678910111213141516171819202122232425262728293031323334353637383940# 安装编译依赖组件。sudo apt install -y libncurses5-dev libssl-dev bison flex libelf-dev gcc make openssl libc6-devsudo apt install -y flex bison make gcc libssl-dev bc libelf-devwget https://mirrors.tuna.tsinghua.edu.cn/kernel/v4.x/linux-4.18.tar.gztar -zxf linux-4.18.tar.gzcd linux-4.18.tar.gz# 设置调试的编译菜单export ARCH=x86make x86_64_defconfigmake menucon ...
The number theory I actually use in RSA puzzles
I tend to remember these algorithms by the question each one answers. Do two numbers share a factor? Can I undo a multiplication after taking a remainder? How do I put several remainders back together? My math is rusty, so these are the working notes and Python snippets I come back to.
Euclid: what divides both numbers?Start with $a>b$. Divide $a$ by $b$ and keep the remainder. A number that divides both $a$ and $b$ must divide that remainder too. That’s why we can trade one GCD problem for a ...
Finance and Stock Calculations
Finance and Stock CalculationsIt took me a while, but I finally got my head around these three rates and the related stock calculations. I’m writing them down here.
Coupon rate, Current yield, Yield-to-maturitySuppose you buy a 3-year security that pays a 6% dividend each year. It costs 900 yuan today and pays you 1000 yuan at the end of three years. Let’s use it to calculate all three yields.
Coupon rateThis is the rate used to calculate each interest payment, based on face value. If you pay 95 ...
Dynamically Debugging an APK with IDA
Dynamically Debugging an APK with IDA1. Unpack the APK with apktools1java -jar apktools.jar d <yourapk> -f -o <output_dir>
The command expands the APK into the output directory. If the directory structure is unfamiliar, this APK reverse-analysis guide provides an overview.
Most of the Java-layer logic is in classes.dex. Since that is awkward to read directly, I convert it to a JAR next.
2. Decompile the Java layer with dex2jar1d2j-dex2jar.sh -d <yourapk>
Drag the resulting JA ...
Installing and Using Pintools and angr on Linux and Windows
Installing and Using Pintools and angr on Linux and WindowsSome reversing challenges are more tedious to work through by hand than they need to be. Pintools can help by measuring what a program does for different inputs. I first tried installing it on Windows, ran into command-line and library trouble, and eventually moved to Linux. These are the steps and snags I recorded along the way.
LinuxDownload and extract the sourceStart by downloading the Pintools source package from Intel.
On Linux, wg ...







