Skip to content

Instantly share code, notes, and snippets.

View Paradoxis's full-sized avatar
:shipit:
Security Person

Luke Paris Paradoxis

:shipit:
Security Person
View GitHub Profile
@Paradoxis
Paradoxis / FbAdsSdkExample.cs
Last active March 10, 2021 04:56
Example of how to use the FacebookAds SDK for C#
using System;
using System.Collections.Generic;
using Facebook;
using FacebookAds;
using FacebookAds.Object;
using FacebookAds.Object.Fields;
namespace FacebookAdsExamples
{
@Paradoxis
Paradoxis / git-scrape.sh
Last active May 30, 2017 20:16
One liner to scape all email addresses in a cloned git repository
git log --all | grep -E -o "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b" | sort -u
@Paradoxis
Paradoxis / findReplace.js
Created July 4, 2016 10:23
Find and replace double curly braces in JavaScript, example: findReplace("Hello, {{ name }}", "name", "John"); // "Hello, John"
/**
* Format double braced template string
* @param {string} string
* @param {string} find
* @param {string} replace
* @returns {string}
*/
function findReplaceString(string, find, replace)
{
if ((/[a-zA-Z\_]+/g).test(string)) {
@Paradoxis
Paradoxis / findReplace.php
Last active March 14, 2022 13:30
Find and replace double curly braces in PHP, example: findReplace("Hello, {{ name }}", "name", "John"); // "Hello, John" Raw
<?php
/**
* Parses a template argument to the specified value
* Template variables are defined using double curly brackets: {{ [a-zA-Z] }}
* Returns the query back once the instances has been replaced
* @param string $string
* @param string $find
* @param string $replace
* @return string
@Paradoxis
Paradoxis / wazzaa.regex
Created July 7, 2016 14:03
A regular expression to match all of your WAZZAAAAAAHHHHH needs.
/^(?:W(?:[H]+)?(?:[UA])[ZS]+[A]+(?:[H]+)?)(?:[\?\!\.\@]+)?$/ig
@Paradoxis
Paradoxis / slack_delete.py
Last active January 30, 2024 17:30 — forked from jackcarter/slack_delete.py
Delete all Slack files. Usage: python slack_delete.py --token <your token>
import argparse
import requests
import time
import json
def main():
"""
Entry point of the application
:return: void
@Paradoxis
Paradoxis / http-to-ws.js
Last active April 16, 2024 21:02
Convert WS/HTTP links with JavaScript
/**
* Converts an HTTP(S) url to a WS(S) URL
* Example:
* httpUrlToWebSockeUrl("http://www.example.com/") -> ws://www.example.com/
* httpUrlToWebSockeUrl("https://www.example.com/") -> wss://www.example.com/
*
* @param {string} url
* @return {string}
*/
function httpUrlToWebSockeUrl(url)
@Paradoxis
Paradoxis / BrowserBackdoor.js
Last active May 19, 2017 12:15
Browser backdoor REST fallback proposal
function wsConnect(url)
{
if (ws == null && "WebSocket" in window) {
ws = new WebSocket(url);
}
if (ws == null && "RestSocket" in window) {
ws = new RestSocket(url);
}
@Paradoxis
Paradoxis / keybase.md
Last active September 2, 2016 13:02
Keybase verification

Keybase proof

I hereby claim:

  • I am paradoxis on github.
  • I am paradoxis (https://keybase.io/paradoxis) on keybase.
  • I have a public key whose fingerprint is 4E1E DEFC A2E2 0F6B B2AF C3DD 94E4 BA77 4EF9 D348

To claim this, I am signing this object:

@Paradoxis
Paradoxis / agressive-url-encode.md
Last active February 10, 2024 23:00
Agressive URL encode

Agressive URL encode

Python based CLI tool to agressively url-encode strings, rather than just encoding non-url characters this tool will encode every character in the URL.

Usage:

Firstly make a function in your .bash_profile to call the script

function url-encode()
{
 python ~//url_encode.py $@