Skip to content

Instantly share code, notes, and snippets.

View atmoner's full-sized avatar
🔥
On fire

ɐʇɯon3ɹ atmoner

🔥
On fire
View GitHub Profile
@atmoner
atmoner / index.js
Created December 6, 2022 19:09 — forked from max-mapper/index.js
secp256k1 encrypt/decrypt with bip32 keys
var KeyEncoder = require('key-encoder')
var VirgilCrypto = require('virgil-crypto').VirgilCrypto
var HDKey = require('hdkey')
const secp256k1 = require('secp256k1')
var keyEncoder = new KeyEncoder('secp256k1')
var hdKey = HDKey.fromMasterSeed(Buffer.from(SEED, 'hex'))
var childKey = hdKey.derive(PATH)
@atmoner
atmoner / app.js
Created July 29, 2022 19:26
Akash WebSocket
import WebSocket from 'ws';
const ws = new WebSocket('wss://rpc-akash-ia.notional.ventures/websocket');
ws.on('open', function open() {
console.log('Connected on Akash blockchain from WebSocket');
ws.send(JSON.stringify({
"method":"subscribe",
"params": ["tm.event='NewBlock'"],
"id":"1",
"jsonrpc":"2.0"
@atmoner
atmoner / script.js
Created January 27, 2022 22:59 — forked from fadeev/script.js
Example of using CosmJS with `protobufjs` to encode a custom proto message
// Every chain has at least two API endpoints: 26657 (the Tendermint one, roughly
// speaking, lower level, deals with bytes, exposes info about blocks, consensus,
// validators, etc.) and 1317 (the Cosmos one, higher level, your chain's API).
// Since every transaction broadcasted to a chain should be signed (and you don't
// want to do the signing manually), it makes sense to use a signing library.
// For JS/TS it's CosmJS.
// With CosmJS you create a wallet from a mnemonic, create a client from a wallet,
// and use client.signAndBroadcast method to, well, sign and broadcast transaction
// (an array of messages from an address). The client uses 26657 endpoint under the
@atmoner
atmoner / start_stream.sh
Created August 11, 2021 17:16 — forked from miguelmota/start_stream.sh
MJPG-Streamer start and stop bash scripts. For 19 Jan 2014 Update - blog post: http://www.miguelmota.com/blog/raspberry-pi-camera-board-video-streaming/
#!/bin/bash
if pgrep mjpg_streamer > /dev/null
then
echo "mjpg_streamer already running"
else
LD_LIBRARY_PATH=/opt/mjpg-streamer/ /opt/mjpg-streamer/mjpg_streamer -i "input_raspicam.so -fps 15 -q 50 -x 640 -y 480" -o "output_http.so -p 9000 -w /opt/mjpg-streamer/www" > /dev/null 2>&1&
echo "mjpg_streamer started"
fi
<?php
/**
* Generated by the WordPress Option Page generator
* at http://jeremyhixon.com/wp-tools/option-page/
*/
class MyExamplePlugin {
private $my_example_plugin_options;

Keybase proof

I hereby claim:

  • I am atmoner on github.
  • I am atmon3r (https://keybase.io/atmon3r) on keybase.
  • I have a public key whose fingerprint is 5C7B C55A 188D 40B5 510A C0BE 4A60 9FEB 369B 278B

To claim this, I am signing this object:

@atmoner
atmoner / dnsdumpster.js
Created June 20, 2020 23:42
dnsdumpster.js (not work, will be debug :/)
var request = require("request");
var tough = require('tough-cookie');
var needle = require("needle");
var Cookie = tough.Cookie;
request.get('https://dnsdumpster.com/', (error, response, body) => {
var cookie = Cookie.parse(response.headers['set-cookie'][0]);
returnCookie = cookie.cookieString();
var finalCookie = returnCookie.split('=');
@atmoner
atmoner / namemash.py
Created June 18, 2020 23:15 — forked from superkojiman/namemash.py
Creating a user name list for brute force attacks.
#!/usr/bin/env python
import sys
import os.path
if __name__ == "__main__":
if len(sys.argv) != 2:
print("usage: {} names.txt".format((sys.argv[0])))
sys.exit(0)
if not os.path.exists(sys.argv[1]):
<php?
function xss_clean($data)
{
// Fix &entity\n;
$data = str_replace(array('&amp;','&lt;','&gt;'), array('&amp;amp;','&amp;lt;','&amp;gt;'), $data);
$data = preg_replace('/(&#*\w+)[\x00-\x20]+;/u', '$1;', $data);
$data = preg_replace('/(&#x*[0-9A-F]+);*/iu', '$1;', $data);
$data = html_entity_decode($data, ENT_COMPAT, 'UTF-8');