Skip to content

Instantly share code, notes, and snippets.

View adrianhorning08's full-sized avatar

Adrian Horning adrianhorning08

View GitHub Profile
@adrianhorning08
adrianhorning08 / index.js
Created November 13, 2024 18:57
Decrypt view stats response
// Async function to handle JSON or encrypted response
let decryptResponse = async (response) => {
let result;
// These are Base64 encoded arrays used as the key and IV for AES-GCM decryption
let base64IV =
"Wzk3LCAxMDksIC0xMDAsIC05MCwgMTIyLCAtMTI0LCAxMSwgLTY5LCAtNDIsIDExNSwgLTU4LCAtNjcsIDQzLCAtNzUsIDMxLCA3NF0=";
let base64Key =
"Wy0zLCAtMTEyLCAxNSwgLTEyNCwgLTcxLCAzMywgLTg0LCAxMDksIDU3LCAtMTI3LCAxMDcsIC00NiwgMTIyLCA0OCwgODIsIC0xMjYsIDQ3LCA3NiwgLTEyNywgNjUsIDc1LCAxMTMsIC0xMjEsIDg5LCAtNzEsIDUwLCAtODMsIDg2LCA5MiwgLTQ2LCA0OSwgNTZd";
@adrianhorning08
adrianhorning08 / index.js
Created September 30, 2024 18:03
Scraping Chrome Extensions
import fetch from "node-fetch";
import * as cheerio from "cheerio";
import fs from "graceful-fs";
import { gotScraping } from "got-scraping";
import {
getAllItemsFromSupabaseTable,
getProxyAgent,
getProxyUrl,
getSmartProxyUrl,
supabase,
@adrianhorning08
adrianhorning08 / index.js
Last active November 16, 2024 21:48
Scrape Facebook Group
const allContent = []
function createCSV(data, fileName) {
const headers = [
'id',
'email',
'firstName',
'lastName',
'postId',
'postText',
@adrianhorning08
adrianhorning08 / index.json
Created May 8, 2024 16:18
Trojan Battery Locations
This file has been truncated, but you can view the full file.
{
"success": true,
"results": {
"locations": [
{
"custom_fields": "[]",
"description": "",
"email": "",
"extra": "NM",
"extra2": "",
@adrianhorning08
adrianhorning08 / index.js
Last active April 19, 2024 02:22
Scraping Linkedin Search Results
// copy into a file called linkedinScrape.js (or whatever you want to call it) then call node linkedinScrape.js
const cookies = "" // your cookies
const page = 1
const searchTerm = "marketing agency"
const results = await searchLinkedIn(searchTerm, page)
console.log(results)
export async function searchLinkedIn(query, page = 1) {
try {
@adrianhorning08
adrianhorning08 / index.js
Created January 19, 2024 19:26
Proxy Puppeteer
// local setup
const browser = await puppeteerExtra.launch({
headless: false,
args: [`--proxy-server=http://${ip}:${port}`],
// devtools: true,
executablePath:
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
});
@adrianhorning08
adrianhorning08 / index.js
Created January 10, 2024 22:21
How to decrypt emails on cloudflare protected sites
import * as cheerio from "cheerio";
function getHexValue(str, index) {
var hex = str.substr(index, 2);
return parseInt(hex, 16);
}
function decryptEmail(encodedEmail, startIndex) {
var decryptedEmail = "",
key = getHexValue(encodedEmail, startIndex);
@adrianhorning08
adrianhorning08 / index.js
Created January 5, 2024 23:35
Create CSV on frontend
export function createCSV(data, fileName) {
const headers = Object.keys(data[0]);
const csvContent = [
headers.join(","),
...data.map((row) =>
headers
.map((header) => {
const value = row[header];
if (value === null) return "null";
@adrianhorning08
adrianhorning08 / tickets.json
Last active September 27, 2023 18:16
Tickets
[
{
"date": "2023-09-27",
"blocked": false,
"availableTickets": 1572,
"timeSlots": [
{
"time": "16:15",
"blocked": false,
"availableTickets": 50,
[
{
"ad_title": "Tijdelijk 14,95!",
"brand_name": "Lovinoshop",
"cost": 1,
"ctr": 0.04,
"favorite": false,
"id": "7134135044139253761",
"industry_key": "label_16105000000",
"is_search": true,