Skip to content

Instantly share code, notes, and snippets.

View antojoseph's full-sized avatar
💭
arg0=0xffffffffffffffff

xyz antojoseph

💭
arg0=0xffffffffffffffff
View GitHub Profile
@antojoseph
antojoseph / testmetadata.json
Created April 5, 2024 21:04
some metadata
{
"name": "Some operator",
"website": "https://www.example.com",
"description": "I operate on some data",
"logo": "https://www.example.com/logo.png",
"twitter": "https://x.com/example"
}
@antojoseph
antojoseph / terminal_log.log
Created December 6, 2023 23:09
image signing with dockerhub
❯ docker login
Log in with your Docker ID or email address to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com/ to create one.
You can log in with your password or a Personal Access Token (PAT). Using a limited-scope PAT grants better security and is required for organizations using SSO. Learn more at https://docs.docker.com/go/access-tokens/
Username: blocksek
Password:
Login Succeeded
❯ docker push blocksek/test
@antojoseph
antojoseph / dedupe.py
Last active November 8, 2023 14:29
Dedupe votes on Mainnet & Mantle
from web3 import Web3
import json
# Set up RPC providers for both chains
rpc_url = 'https://rpc.mantle.xyz/'
mainnet_rpc_url = 'https://rpc.ankr.com/eth'
# Initialize Web3 connections
web3 = Web3(Web3.HTTPProvider(rpc_url))
mainnet_web3 = Web3(Web3.HTTPProvider(mainnet_rpc_url))
@antojoseph
antojoseph / test.sh
Last active October 17, 2023 14:44
test.sh
./grpcurl -plaintext -d '{"data": "MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwM
@antojoseph
antojoseph / wallet.js
Created December 22, 2021 00:24
Ethereum Simple Wallet
var util = require('ethereumjs-util');
const privateKey = 'your_private_key_here;
const privatKeyBuffer =new Buffer.from(privateKey,'hex');
var publicKey = util.privateToPublic(privatKeyBuffer);
console.log(util.bufferToHex(publicKey));
console.log("address:",util.bufferToHex(util.publicToAddress(publicKey)))
@antojoseph
antojoseph / hdwallet.js
Created December 22, 2021 00:17
Ethereum HD wallet example
var bip39 = require('bip39');
var HDKey = require('hdkey');
var ethhdkey = require('ethereumjs-wallet/hdkey');
const mnemonic = bip39.generateMnemonic();
const seed = bip39.mnemonicToSeedSync(mnemonic).toString('hex');
var hdkey = HDKey.fromMasterSeed(Buffer.from(seed, 'hex'))
console.log(hdkey.publicExtendedKey)
@antojoseph
antojoseph / how-to.txt
Created May 27, 2020 22:04
Intercept SSL traffic on Android 9.0
export burpsuite/proxy certificate
install cert on android device
su and remount system as rw : mount -o rw,remount,rw /system
find installed cert here /data/misc/keystore/user_0
verify with openssl x509 -in cert.cer -inform der -text
copy cert from /data/misc/user/0/cacerts-added/cert.0 to /system/etc/security/cacerts/
Tip : null out /data/misc/keychain/pins to remove any ssl pins made by Android
#import tensorflow 1.x as this is required for older codebases,don't forget to restart the runtime
%tensorflow_version 1.x
print('Tensorflow version: {}'.format(tf.__version__) )
#sometimes, you need a specific version of tensorflow,for eg: stylegan
%tensorflow_version 2.x
!pip uninstall -y tensorflow
!pip install tensorflow-gpu==1.14.0
#Select GPU as the accelarator for this to work!
@antojoseph
antojoseph / simple-dnn.py
Last active April 9, 2020 16:21
simple fashion_mnist classification with a dnn
import tensorflow as tf
print(tf.__version__)
class myCallback(tf.keras.callbacks.Callback):
def on_epoch_end(self, epoch, logs={}):
if(logs.get('loss')<0.25):
print("\nReached 75% accuracy so cancelling training!")
self.model.stop_training = True
callbacks = myCallback()
@antojoseph
antojoseph / ResponseProcessing.py
Last active November 22, 2020 15:17
Burp Extender - Python Scripter Plug-in to send responses to a docker container for further processing ( decryption/encoding/analysis )
import sys
import re
import urllib2
import base64
print(sys.version)
print(sys.path)
pattern = r"content-type:.application/json"