Skip to content

Instantly share code, notes, and snippets.

View tin-z's full-sized avatar

Altin (tin-z) tin-z

View GitHub Profile
@tin-z
tin-z / user.js
Created January 5, 2025 22:08 — forked from brainfucksec/user.js
user.js - brainfucksec
/*********************************************************************
*
* Name: user.js | brainfucksec
* Date: 2024-10-20
* Version: 0.23.0
* Descr.: Mozilla Firefox configuration file: `user.js`
* URL: https://gist.github.com/brainfucksec/68e79da1c965aeaa4782914afd8f7fa2
* Maintainer: brainf+ck
*
* INFO:
@tin-z
tin-z / Browser-Compilation-With-Custom-Clang.md
Created March 24, 2025 23:00 — forked from pr0cf5/Browser-Compilation-With-Custom-Clang.md
Instructions for compiling browsers with custom llvm binaries

Chromium

Let's assume we're trying to build chromium with sancov. Although this is possible purely with gn arguments, I'll demonstrate this with system toolchain.

First, create a file at out/sancov/args.gn. The contents of the file should be as follows:

custom_toolchain="//build/toolchain/linux/unbundle:default"
host_toolchain="//build/toolchain/linux/unbundle:default"
is_clang = true
clang_use_chrome_plugins = false
@tin-z
tin-z / ARMonQEMUforDebianUbuntu.md
Created March 27, 2025 16:19 — forked from luk6xff/ARMonQEMUforDebianUbuntu.md
Emulating ARM with QEMU on Debian/Ubuntu

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux

If there's no qemu-arm-static in the package list, install qemu-user-static instead

@tin-z
tin-z / library_injector.cpp
Created March 27, 2025 16:23 — forked from saagarjha/library_injector.cpp
Load a library into newly spawned processes (using DYLD_INSERT_LIBRARIES and EndpointSecurity)
// To compile: clang++ -arch x86_64 -arch arm64 -std=c++20 library_injector.cpp -lbsm -lEndpointSecurity -o library_injector,
// then codesign with com.apple.developer.endpoint-security.client and run the
// program as root.
#include <EndpointSecurity/EndpointSecurity.h>
#include <algorithm>
#include <array>
#include <bsm/libbsm.h>
#include <cstddef>
#include <cstdint>

There are lots of command lines which can be used with the Google Chrome browser. Some change behavior of features, others are for debugging or experimenting. This page lists the available switches including their conditions and descriptions. Last automated update occurred on 2018-10-20.

Condition Explanation
-- Report pseudo allocation traces. Pseudo traces are derived from currently active trace events.
--/prefetch:1 /prefetch:# arguments to use when launching various process types. It has been observed that when file reads are consistent for 3 process launches with the same /prefetch:# argument, the Windows prefetcher starts issuing reads in batch at process launch. Because reads depend on the process type, the prefetcher wouldn't be able to observe consistent reads if no /prefetch:# arguments were used. Note that the browser process has no /prefetch:# argument; as such a