Skip to content

Instantly share code, notes, and snippets.

View n0ncetonic's full-sized avatar
🙃
Staring intensely at my macbook screen

noncetonic n0ncetonic

🙃
Staring intensely at my macbook screen
View GitHub Profile
@n0ncetonic
n0ncetonic / MegaBonusCashbackExtDetect.js
Created September 4, 2018 17:48
Cashback Ext Detection
var detectExt = {
is_install: "",
/**
* поиск расширения в chrome
* @param onload
* @param onerror
*/
detect_ext_chrome: function (onload, onerror) {
var detect = function (base, if_installed, if_not_installed) {
var s = document.createElement('script');

Intercepts HTTPs Traffic with Python & mitmproxy

Introduction

Modern applications usually make use of back-end API servers to provide their services. With a non-transparent HTTPs proxy, which intercepts the communication between clients and servers (aka the man-in-the-middle scheme), you can easily manipulate both API requests and responses.

This manual helps you create your own proxy with Python and mitmproxy/libmproxy. Mitmproxy ships with both a standalone command-line tool (mitmproxy) and a Python library (libmproxy).

@n0ncetonic
n0ncetonic / xcode_markdown.py
Created June 11, 2018 14:41 — forked from pudquick/xcode_markdown.py
Abuse Xcode's embedded CommonMark framework to generate HTML from markdown
# hax hax hax hax hax
import ctypes, os, sys
newstderr = os.dup(2) # This is to mute dyld LC_RPATH warnings
os.dup2(os.open('/dev/null', os.O_WRONLY), 2) # because we're loading Xcode frameworks from python
CM = ctypes.CDLL('/Applications/Xcode.app/Contents/SharedFrameworks/DVTMarkup.framework/Versions/A/Frameworks/CommonMark.framework/CommonMark')
sys.stderr = os.fdopen(newstderr, 'w') # This restores stderr
cmark_markdown_to_html = CM.cmark_markdown_to_html
cmark_markdown_to_html.restype = ctypes.c_char_p

Simple Security Guidelines

Using an iDevice? (Best option)

  • Use an iPod or an iPad without a SIM card
  • Use an iPhone
  • Do not jailbreak
  • Always upgrade to new iOS versions
  • Use Brave browser

Need Secure chat?

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

@n0ncetonic
n0ncetonic / .htaccess
Created June 9, 2018 15:27 — forked from curi0usJack/.htaccess
Drop into your apache working directory to instantly redirect most AV crap elsewhere.
RewriteEngine On
# Uncomment the below line for verbose logging, including seeing which rule matched.
#LogLevel alert rewrite:trace5
# BURN AV BURN
# AWS Exclusions. Cloudfronted requests by default will have a UA of "Amazon Cloudfront". More info here: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html#header-caching-web-device
RewriteCond expr "-R '54.0.0.0/8'" [OR]
RewriteCond expr "-R '52.0.0.0/8'" [OR]
#!/bin/bash
mkdir -p scripts
cat << EOF
#!/bin/bash
[[ $3 != "/" ]] && exit 0
/bin/launchctl load /Library/LaunchDaemons/com.acme.osqueryd.plist
package main
import (
"bufio"
"bytes"
"flag"
"fmt"
"io"
"log"
"os"
@n0ncetonic
n0ncetonic / headless-chrome.js
Created June 1, 2018 19:09 — forked from magician11/headless-chrome.js
How to grab the page source from any dynamically generated webpage and then process it .
const CDP = require('chrome-remote-interface');
const chromeLauncher = require('chrome-launcher');
const cheerio = require('cheerio');
(async function() {
const launchChrome = () =>
chromeLauncher.launch({ chromeFlags: ['--disable-gpu', '--headless'] });
const chrome = await launchChrome();
const protocol = await CDP({ port: chrome.port });
@n0ncetonic
n0ncetonic / headless-chrome.js
Created June 1, 2018 19:08 — forked from magician11/headless-chrome.js
How to grab the page source from any dynamically generated webpage and then process it .
const CDP = require('chrome-remote-interface');
const chromeLauncher = require('chrome-launcher');
const cheerio = require('cheerio');
(async function() {
const launchChrome = () =>
chromeLauncher.launch({ chromeFlags: ['--disable-gpu', '--headless'] });
const chrome = await launchChrome();
const protocol = await CDP({ port: chrome.port });