Skip to content

Instantly share code, notes, and snippets.

View p410n3's full-sized avatar

Phillip L. p410n3

View GitHub Profile

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@zachflower
zachflower / tor_curl.php
Last active March 15, 2024 15:02
How To Anonymize PHP cURL Requests Using Tor
<?php
$ip = '127.0.0.1';
$port = '9051';
$auth = 'PASSWORD';
$command = 'signal NEWNYM';
$fp = fsockopen($ip,$port,$error_number,$err_string,10);
if(!$fp) { echo "ERROR: $error_number : $err_string";
return false;
@felthy
felthy / javascript-debug-printObject-function.js
Created April 21, 2015 06:27
Recursively dump a javascript object into a string, for when you don't have a debugger
/**
* When investigating a selenium test failure on a remote headless browser that couldn't be reproduced
* locally, I wanted to add some javascript to the site under test that would dump some state to the
* page (so it could be captured by Selenium as a screenshot when the test failed). JSON.stringify()
* didn't work because the object declared a toJSON() method, and JSON.stringify() just calls that
* method if it's present. This was a Moment object, so toJSON() returned a string but I wanted to see
* the internal state of the object instead.
*
* So, this is a rough and ready function that recursively dumps any old javascript object.
*/
@bladeSk
bladeSk / SQLite-PHP-quickstart.php
Last active November 5, 2024 01:48
SQLite3 PHP Quickstart Tutorial
<?php
// This file walks you through the most common features of PHP's SQLite3 API.
// The code is runnable in its entirety and results in an `analytics.sqlite` file.
// Create a new database, if the file doesn't exist and open it for reading/writing.
// The extension of the file is arbitrary.
$db = new SQLite3('analytics.sqlite', SQLITE3_OPEN_CREATE | SQLITE3_OPEN_READWRITE);
// Errors are emitted as warnings by default, enable proper error handling.
@thestinger
thestinger / Android_Q_Privacy.md
Last active January 31, 2024 22:25
Android Q privacy features in the context of the AndroidHardening / GrapheneOS work

Some of the privacy features that I developed in the past are now going to be standard Android features in the next major release. In some cases, the implementation that I worked on ended up being a direct inspiration for the upstream work. I also pushed them to enable permissions review by default, which may have had some influence on it finally shipping as enabled. It was seemingly implemented for some niche scenario and most of their privacy / security team didn't know about the feature existing when I talked to them about it in the past.

Most of my work has focused on improving security, and that focus will be somewhat increased in Android Q due to many of the privacy improvements being part of the baseline OS.

Android P had previously replaced some of the privacy features developed as part of the AndroidHardening project such as restricting access to the camera, microphone and sensors in the background.

Features that were not implemented by my past work: