Event JSON
{
"id": "82fa519d4e364af97198ce3145b0a476af5e24aa341f79bb9e9292284ee51b36",
"pubkey": "33c6856583b5cd5932a5b339b87138a2b6b75f83886176032284d339cf1054fb",
"created_at": 1687217773,
"kind": 0,
"tags": [],
"content": "{\"display_name\":\"\",\"name\":\"\",\"about\":\"Hi.\\n\\nI am the one who did the mass spam bots.\\n\\nI am no longer touching this account \u0026 no longer telling you who exactly i am. All remains a mystery.\\n\\nYou may also check:\\n- note1ydazp4s0k2c8q5swzm336frttzcdq6atkpvm7uuzmt866qdtzgtqngnr6q\\n\\nSpamBot Source Code:\\n// Save the following as index.js\\n\\n// Licensed under Public Domain.\\n\\n// Before running the following, Ensure that you've installed ws and nostr-tools:\\n// ~/nostrspam $ npm install ws nostr-tools\\n\\n// Usage: node index.js wss://relay.example1.com wss://relay.example2.com ....\\n\\nconst relays = process.argv.slice(2);\\nconst filter = {} // If needed.\\n\\nif (!process.env.RELAY_URL \u0026\u0026 !relays.length) {\\n console.log(\\\"Usage: node index.js [relay-addresses]\\\");\\n process.exit(1);\\n}\\n\\nif (!process.env.RELAY_URL) {\\n console.log(\\\"Relays:\\\", relays.join(\\\", \\\"));\\n\\n const cluster = require('cluster');\\n for (RELAY_URL of relays) {\\n cluster.fork({ RELAY_URL });\\n }\\n\\n cluster.on('exit', (worker, code, signal) =\u003e {\\n console.log(`Worker ${worker.process.pid} died. Forking another one....`);\\n cluster.fork({ RELAY_URL: worker.process.env.RELAY_URL });\\n });\\n\\n return;\\n}\\n\\nconst WebSocket = require('ws');\\nconst crypto = require('crypto');\\nconst { validateEvent, verifySignature, generatePrivateKey, getPublicKey, getEventHash, getSignature } = require('nostr-tools');\\n\\nconst randStr = _ =\u003e crypto.randomBytes(_).toString(\\\"base64url\\\");\\nfunction spam(tags = [], c) {\\n const privkey = generatePrivateKey();\\n const pubkey = getPublicKey(privkey);\\n\\n let profile = {\\n created_at: Math.floor(Date.now() / 1000),\\n kind: 0,\\n pubkey,\\n content: JSON.stringify({\\n about: randStr(300),\\n display_name: randStr(20),\\n name: randStr(20)\\n }),\\n tags: []\\n }\\n\\n let event = {\\n created_at: Math.floor(Date.now() / 1000),\\n kind: 1,\\n pubkey,\\n content: randStr(300),\\n tags\\n }\\n\\n profile.id = getEventHash(profile);\\n profile.sig = getSignature(profile, privkey);\\n\\n event.id = getEventHash(event);\\n event.sig = getSignature(event, privkey);\\n\\n if (!validateEvent(event) || !verifySignature(event) || !validateEvent(profile) || !verifySignature(profile)) return console.log(\\\"invalid\\\");\\n\\n return [profile, event];\\n}\\n\\nfunction newrelay(addr, eose = false) {\\n const relay = new WebSocket(addr);\\n\\n relay.addr = addr;\\n console.log(\\\"connecting\\\", addr)\\n relay.on('open', _ =\u003e {\\n relay.send(`[\\\"REQ\\\", \\\"relayevent\\\", ${JSON.stringify(filter)}]`);\\n console.log(\\\"ESTABLISHED\\\", addr);\\n });\\n\\n relay.on('message', data =\u003e {\\n try {\\n data = JSON.parse(data);\\n } catch (error) {\\n return console.error(error);\\n }\\n\\n if (data[0] === \\\"OK\\\") return console.log(addr, data.join(\\\" \\\"));\\n if (data[0] !== \\\"EVENT\\\") return;\\n const ev = data[2];\\n\\n for (sendev of spam([[\\\"e\\\", ev.id],[\\\"p\\\", ev.pubkey]], ev.content)) {\\n relay.send(JSON.stringify(\\n [\\\"EVENT\\\",\\n sendev\\n ]\\n ));\\n }\\n\\n for (sendev of spam([[\\\"e\\\", ev.id]], ev.content)) {\\n relay.send(JSON.stringify(\\n [\\\"EVENT\\\",\\n sendev\\n ]\\n ));\\n }\\n\\n for (sendev of spam()) {\\n relay.send(JSON.stringify(\\n [\\\"EVENT\\\",\\n sendev\\n ]\\n ));\\n }\\n\\n console.log(addr, ev.pubkey, ev.id);\\n });\\n\\n relay.on('error', _ =\u003e console.error(relay.addr, _));\\n relay.on('close', _ =\u003e {\\n for (i in ['open', 'message', 'error', 'close']) {\\n relay.removeAllListeners(i);\\n }\\n\\n newrelay(addr);\\n });\\n}\\n\\nnewrelay(process.env.RELAY_URL);\",\"picture\":\"\",\"banner\":\"\",\"website\":\"\",\"nip05\":\"\",\"lud16\":\"\",\"lud06\":\"\"}",
"sig": "d5a0a052b45abf84ad292ad73f71de77787592fc76b95a282ab7bef6f50a6a7f76efc4ec43567c585cc0a5fd4fce56bd9306e957e9d7dc62eb00fc6c7e3b79e8"
}