Skip to content

Instantly share code, notes, and snippets.

View wv-jessejjohnson's full-sized avatar

Jesse Johnson wv-jessejjohnson

View GitHub Profile
@Wh1terat
Wh1terat / deob.js
Last active January 28, 2025 00:51
Incapsula JS Deobfuscator (obfuscator.io) - JS
#!/usr/bin/env node
var fs = require('fs');
var esprima = require('esprima');
var escodegen = require('escodegen');
var estraverse = require('estraverse');
var debug = true;
var rename = true;
var stringrotatefunc = `
(function (array, times) {
/* *******************************************************************************************
* PUPPETEER
* https://pptr.dev/
* ******************************************************************************************* */
// When you install Puppeteer, it downloads a recent version of Chromium (~170MB Mac, ~282MB Linux, ~280MB Win)
// that is guaranteed to work with the API.
npm install puppeteer
@prescience-data
prescience-data / 3proxy.cfg
Created May 21, 2020 11:57
Demo config for 3proxy
#!/usr/local/bin/3proxy
system "echo 3proxy up!"
# you may use system to execute some external command if proxy starts
nserver 9.9.9.9
nserver 149.112.112.112
nscache 65536
timeouts 1 5 30 60 180 1800 15 60
@prescience-data
prescience-data / BotcheckActor.js
Created June 26, 2020 22:39
Puppeteer bot detection tests
/** namespace App\Actors **/
const Actor = require('./Actor');
class BotcheckActor extends Actor {
platform = 'botcheck';
constructor(env) {
const config = require('../../config/actors/botcheck');
@dgozman
dgozman / description.md
Created October 2, 2020 04:35
Playwright network settled helper

Network Settled

This helper waits for requests initiated by the action to finish. It is similar to waitUntil: 'networkidle' option, but is designed to work with any action, like click.

Example usage:

const waitForNetworkSettled = require('./networkSettled');

// Wait for network settled after navigation,
@dmattera
dmattera / launchctl_man_pages.md
Last active August 22, 2025 16:48
macOS man page entries for launchctl services

This list was auto-generated on macOS 10.15 (Catalina) using a script that did the following:

  1. grabbed the name of all the .plist files located in the 5 folders used by launchctl:
  • ~/Library/LaunchAgents Per-user agents provided by the user.
  • /Library/LaunchAgents Per-user agents provided by the administrator.
  • /Library/LaunchDaemons System wide daemons provided by the administrator.
  • /System/Library/LaunchAgents OS X Per-user agents.
  • /System/Library/LaunchDaemons OS X System wide daemons.
@prescience-data
prescience-data / download-chrome.ts
Created December 8, 2021 00:20
Download most recent Chrome build
import { createWriteStream, ensureDir } from "fs-extra"
import got from "got"
import { Stream } from "stream"
export type Platform =
| "Win_x64"
| "Win"
| "Mac"
| "Mac_Arm"
| "Linux_x64"
@prescience-data
prescience-data / strip-page.ts
Last active September 25, 2024 05:21
Strip Page With Puppeteer
import { Buffer } from "buffer"
import { createHash } from "crypto"
import { HTTPRequest, Protocol } from "puppeteer-core"
import { isPuppeteerPage, Page } from "../types"
type CaptureSnapshotResponse = Protocol.DOMSnapshot.CaptureSnapshotResponse
type RequestHook = (request: HTTPRequest) => Promise<void>
@paceaux
paceaux / clientStorage.js
Last active March 26, 2025 20:34
ClientStorage Module for saving things in a namespaced way to local or session storage.
class ClientStorage {
/**
* Converts a string into a namespaced string
* @param {string} namespace the namespace
* @param {string} keyname keyname
* @returns {string} a string with namespace.keyname
*/
static getNamespacedKeyName(namespace, keyname) {
let namespacedKeyName = "";
@paceaux
paceaux / tableOfContents.js
Created March 16, 2022 16:49
A class for generating a table of contents on a page.
class TableOfContents {
static listContainerClass = 'articleTOC__list';
static listItemClass = 'articleTOC__item';
static listLinkClass = 'articleTOC__link';
static modifierSeparator = '--';
/*
* @description Gets a list of all title elements having an ID in a given container
* @param {HTMLElement} container - An element containing title elements (h1, h2, h3)