Skip to content

Instantly share code, notes, and snippets.

Avatar

Justin Gardner Rhynorater

View GitHub Profile
View myaccountmain.js
This file has been truncated, but you can view the full file.
!(function (I, e) {
if ("object" == typeof exports && "object" == typeof module)
module.exports = e();
else if ("function" == typeof define && define.amd) define([], e);
else {
var o = e();
for (var t in o) ("object" == typeof exports ? exports : I)[t] = o[t];
}
})(self, function () {
View gist:cec4a36131e4f3d36f1cdc9c38bcaff4
{
"site": {
"externalURL": "http://NOPE.com/",
"auth.providers": [
{
"type": "builtin"
}
],
"search.largeFiles": [
"*.js"
@Rhynorater
Rhynorater / Demo.sol
Created Oct 18, 2021
Example of Differences in Data Locations When Creating New Variables (Storage -> Storage vs Storage -> Memory)
View Demo.sol
pragma solidity ^0.8.0;
contract Demo{
event log(string data);
string public d= "This is a variable";
string public mv = "changed";
string public mv2 = "changed2";
constructor () {
string storage x = d;
string storage y = x; // Change this to: string memory y = x;
@Rhynorater
Rhynorater / createWalletFromPrivateKey.js
Created Oct 15, 2021
Create JSON Wallet from Private Key and Password
View createWalletFromPrivateKey.js
var Web3 = require('web3');
const fs = require('fs')
const inquirer = require('inquirer')
var questions = [
{
type: 'input',
name: 'privateKey',
message: "What is your privateKey?"
},
{
@Rhynorater
Rhynorater / nextContractAddr.js
Created Oct 11, 2021
Quick command-line script to predict the next contract address for an account based off its current nonce and address.
View nextContractAddr.js
var web3 = require('web3');
var rlp = require('rlp');
var process = require( 'process' );
var nonce = parseInt(process.argv[3]);
var account = process.argv[2];
var d = web3.utils.sha3(rlp.encode([account, nonce]));
console.log("0x"+d.substring(d.length-40));
View loadCookiesFromEditThisCookie.py
import json
import requests
import http.cookiejar
# Load from EditThisCookie export file
def loadCookies(jsonFileName):
x = open(jsonFileName)
d = json.loads(x.read())
cookiejar = http.cookiejar.CookieJar()
for cookie in d:
@Rhynorater
Rhynorater / formatClipboardJSON.py
Created Jun 11, 2021
Format JSON Data in the Clipboard
View formatClipboardJSON.py
#! /usr/bin/env python3
import pyperclip
import json
contents = pyperclip.paste().replace('[^\\]\\"', '\\\\"')
print(contents)
try:
c = json.loads(contents)
pyperclip.copy(json.dumps(c, indent=4))
except Exception as e:
@Rhynorater
Rhynorater / ipv6rotate.py
Created Sep 9, 2019
Quickly rotating IPs to avoid ip ban using /64 ipv6 block.
View ipv6rotate.py
import requests
from httplib import HTTPConnection
import socket
import subprocess
class MyHTTPConnection(HTTPConnection):
def connect(self):
self.sock = s
if self._tunnel_host:
self._tunnel()
@Rhynorater
Rhynorater / checkms.sh
Created Jul 1, 2019
Bash script to check if a certain domain is user O365
View checkms.sh
#!/bin/bash
# Usage checkms.sh
# domains.txt: file with domains on each line to check
# Output: domains that use O365
# -----
# Usage2 checkms.sh domain.com
# Output: domain if uses 0365, nothing if not
if [ "$#" -eq 1 ]; then
x=$(curl -s -k "https://login.microsoftonline.com/getuserrealm.srf?login=username@$1&xml=1" | egrep "Federated|Managed")
if [[ ! -z $x ]]; then