Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing notifications for telegram #239

Closed
faisalrathore opened this issue Apr 3, 2023 · 2 comments · Fixed by #270
Closed

Missing notifications for telegram #239

faisalrathore opened this issue Apr 3, 2023 · 2 comments · Fixed by #270
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@faisalrathore
Copy link

when I try to run notify after nuclei scan it does not send all notify prompts to telegram randomly sends some of them and does not send others then I have to manually use notify to send those scan results. I have think there is some integration problem with telegram

@faisalrathore faisalrathore added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Apr 3, 2023
@shizzgar
Copy link

when I try to run notify after nuclei scan it does not send all notify prompts to telegram randomly sends some of them and does not send others then I have to manually use notify to send those scan results. I have think there is some integration problem with telegram

Try -bulk option

@moein9
Copy link

moein9 commented Jun 5, 2023

Hi,

the issue in my case which is with telegram is like that,

The error will happen whenever there is an underscore(_) in the string.

please take a look at my terminal result


root@my-unbuntu:~# notify -version

             __  _ ___    
  ___  ___  / /_(_) _/_ __
 / _ \/ _ \/ __/ / _/ // /
/_//_/\___/\__/_/_/ \_, / v1.0.5
                   /___/  

                projectdiscovery.io

[INF] Current Version: 1.0.5

root@my-unbuntu:~# echo 'rr_r'|notify

             __  _ ___    
  ___  ___  / /_(_) _/_ __
 / _ \/ _ \/ __/ / _/ // /
/_//_/\___/\__/_/_/ \_, / v1.0.5
                   /___/  

                projectdiscovery.io

[INF] Current notify version 1.0.5 (latest)
Using default provider config: /root/.config/notify/provider-config.yaml
rr_r
[ERR] failed to send telegram notification for id: tel : Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 2

root@my-unbuntu:~# echo 'rr_r'|notify -bulk

             __  _ ___    
  ___  ___  / /_(_) _/_ __
 / _ \/ _ \/ __/ / _/ // /
/_//_/\___/\__/_/_/ \_, / v1.0.5
                   /___/  

                projectdiscovery.io

[INF] Current notify version 1.0.5 (latest)
Using default provider config: /root/.config/notify/provider-config.yaml
rr_r
[ERR] failed to send telegram notification for id: tel : Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 2

root@my-unbuntu:~# echo 'rr\_r'|notify -bulk

             __  _ ___    
  ___  ___  / /_(_) _/_ __
 / _ \/ _ \/ __/ / _/ // /
/_//_/\___/\__/_/_/ \_, / v1.0.5
                   /___/  

                projectdiscovery.io

[INF] Current notify version 1.0.5 (latest)
Using default provider config: /root/.config/notify/provider-config.yaml
rr\_r

the last one sent it successfully without errors because I escaped the underscore manually, the result that returned in the telegram was this rr_r, so it means it works well.

I'm not a GOLANG expert but I think implementing
something like this may fix the issue

escapedMessage := strings.ReplaceAll(message, "_", "\\_")
msg := utils.FormatMessage(escapedMessage, utils.SelectFormat(CliFormat, pr.TelegramFormat), p.counter)

@ehsandeep ehsandeep linked a pull request Jul 8, 2023 that will close this issue
@ehsandeep ehsandeep added the Status: Completed Nothing further to be done with this issue. Awaiting to be closed. label Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants