The C++ grammar is convoluted. These notes offer a quickstart/bird's eye view into it.
Here are some versions of the grammar (or C-variants):
#include "library.dl" | |
// ========================================================= | |
// EXAMPLE | |
// ========================================================= | |
/* | |
------------------------------------------------------------ | |
THE PROGRAM |
TOOL := main.exe | |
##################################################### | |
# DEFAULT | |
##################################################### | |
.DEFAULT_GOAL := all | |
all: clean run |
// Here's one way to use Souffle datalog to simulate | |
// reading bytes from memory and assembling a value | |
// out of them (big/little endian-wise). | |
// Working with string representations of binary numbers | |
// in Souffle is somewhat tedious, so I'm going to do | |
// this by storing bytes as numbers. Then, when I pull | |
// out the bytes and assemble them into a value, I just | |
// need to calculate the number from that sequence of | |
// integer byte values. |
The C++ grammar is convoluted. These notes offer a quickstart/bird's eye view into it.
Here are some versions of the grammar (or C-variants):
# -*- coding: utf-8 -*- | |
"""A simple tool to document how to control AWS resources. | |
AWS AUTHENTICATION | |
------------------- | |
In order to run any of the code below, you need a profile with AWS credentials | |
set up on your computer. It's very easy to do this. Google how to configure | |
your profile with boto3, or visit the docs: |
Quick start for using Clang to parse C++ and get an AST.
Some useful resources on this matter:
Some quick tips for using QEMU from the command line (on macOS, but should work on Linux too).
Download an OS ISO, e.g., the netinstall Debian 9.7 ISO:
wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-9.7.0-amd64-netinst.iso
Here's my notes on using Ghidra.
/* | |
======================================================= | |
01 - Arithmetic expressions | |
======================================================= | |
Encoding arithmetic expressions and simple assignments with datalog. | |
The language is a subset of the one in PPA, pp. 3-4. | |
*/ |