Skip to content

Instantly share code, notes, and snippets.

@3ch01c
3ch01c / URLSearchParams.js
Last active April 4, 2020 19:46
Non-standard URLSearchParams generator functions
'use strict'
// Other ways APIs implement URLSearchParams. Not my own, but I can't find the original source.
// https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/URLSearchParams
var obj = {
a: 1,
b: 2,
c: [3, 4, 5, null, 7],
foo: {bar: 'baz'}
};
<?php
$id = $_GET['id'];
$servername = ‘localhost’;
$username = 'admin';
$password = 'P@ssw0rd!';
$database = ‘data-feeds’;
$conn = new mysqli($servername, $username, $password);
$query = "SELECT username FROM users WHERE id = $id;";
$result = conn->query($query);
while($obj = $result->fetch_object()){
$ python3
Python 3.6.8 (default, Jan 14 2019, 11:02:34)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import lzma
>>> datapath='/mnt/data-feeds/file/2019/08/20190814T12.tar.xz'
>>> f = lzma.open(datapath)
>>> contents = f.read()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
@3ch01c
3ch01c / badhash.py
Created February 22, 2019 21:35
bad hash
#! /usr/local/bin/python3
import random
from string import ascii_lowercase
import sys
import requests
def secure_hash(p):
l = len(p)
#print("Get the length of the plaintext: l = len('{:s}') = {:d}".format(p,l))
# For https://acmsigsec.mst.edu/ctf/badhash/
import random
from string import ascii_lowercase
import re
def secure_hash(p):
l = len(p)
print("Get the length of the plaintext: l = len('{:s}') = {:d}".format(p,l))
random.seed(ord(p[0]))
@3ch01c
3ch01c / userChrome.css
Created June 9, 2018 06:51
Firefox style: 3ch01c
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
#TabsToolbar { visibility: collapse !important; }
/* Hide the sidebar bookmarks search */
#bookmarksPanel > hbox { display: none !important; }
/* Remove border padding around sidebar */
.sidebar-placesTree { border: none !important; padding-top: 10px !important; background: #111 !important; }
/* Remove Bookmarks title header bar */
@3ch01c
3ch01c / openssl_commands.md
Created May 21, 2018 20:27 — forked from p3t3r67x0/openssl_commands.md
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@3ch01c
3ch01c / EHC Trinity
Created October 11, 2014 03:22
Intel log of EHC activity at Trinity
─ 10/9/2014 ──────────────────────────────────────────────────────────────────────────
10:19 <iammeuru> destroyed an L7 Resonator on Trinity Site
10:19 <d0gboy> destroyed an L7 Resonator on Ground Zero
10:19 <CrystalBell> destroyed an L7 Resonator on Original Trinity Crater
10:19 <d0gboy> captured Trinity Site
10:19 <d0gboy> deployed an L8 Resonator on Trinity Site
10:20 <CrystalBell> deployed an L8 Resonator on Original Trinity Crater
10:20 <CrystalBell> captured Original Trinity Crater
10:20 <CrystalBell> deployed an L1 Resonator on Original Trinity Crater
10:20 <CrystalBell> deployed an L1 Resonator on Original Trinity Crater
// ==UserScript==
// @id iitc-plugin-bookmarks@3ch01c
// @name IITC plugin: Bookmarks for maps and portals
// @category Controls
// @version 0.2.8.20140313.215026
// @namespace https://github.com/3ch01c/ingress-intel-total-conversion
// @updateURL none
// @downloadURL none
// @description [local-2014-03-13-215026] Save your favorite Maps and Portals and move the intel map with a click. Works with sync.
// @include https://www.ingress.com/intel*