projectdiscovery / notify

Notify is a Go-based assistance package that enables you to stream the output of several tools (or read from a file) and publish it to a variety of supported platforms.

Home Page:https://projectdiscovery.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Optional support to push bulk data using file instead of per line

DEMON1A opened this issue · comments

  • Hey there, Is there an option on notify to not return results line by line over there on the discord webhooks? I'm using notify on my discord bot to make things faster over there, but it's really not good when notify keep sending a lot of messages based on the command lines that keeps spamming the server users with a lot of notifications. if there's no option it will be really great if you gonna do something about it.

Same issues here, I hooked notify through telegram which keep sending me every message for every links (crawler) it found.

FYI, as of now, it's the design choice to send results line by line to not HIT the rate limit error from these webhooks to sending large results at once, we will see if we can have some flexibility here.

I resolved this issue on my discord-recon bot by adding two layers of validation. the first one checks if the output is more than 2000 characters. if it's then the bot won't send the result in direct. but it will send it in a file stored locally. and the second validation if the output of the tools is more than 8mb. it gonna use an upload service then send the download URL instead of sending it over discord. i hope that can help with notify case

( Yeah I know that already fixed my issue, but most command take time to get executed that leaves me with the fact i need a linux based tool out-side the bot to send the output on background process so the bot can go faster and handle many commands on the same time )

There's a quick fix from cmd (in my case):

  • Replace \n at the end of your output.txt with %0a if you're pipe notify with a result scanning. (congrat to my co-worker/senior for this great help)

@tin-nt something like this subfinder -d hackerone.com | tr '\n' ' ' | notify? works as needed here and will also affect the output in discord or slack as well?

@DEMON1A Just to confirm again, the use case of this will be when you want to post data from a file to notify and not real-time?

Yeah, that's the point here

@tin-nt @DEMON1A this is now supported in the dev version

./notify -data results.txt -bulk

You can also control how much data is to be sent with -char-limit, as default 4000 chars.