Find Bugs While Sleeping ? Get Phone Notifications When A Bug Is Found
2023-9-18 12:59:21 Author: infosecwriteups.com(查看原文) 阅读量:12 收藏

Hello Everyone!

Om Arora

InfoSec Write-ups

In the last blog I posted about the free VPS setup and got amazing response.

So in this Blog I am going to show you how to get notifications on your phone while your scripts are running on the VPS, so you don’t miss any updates.

For Example:

Suppose you have a script like this:

Now we run this script on the VPS

Now you will receive a notification on your discord as per your script as you can see:

Now we are going to learn how to do this

So Lets Get Started!!

First Create a discord server:

Click on Create My Own

Now add a text channel to your server and make it a private channel

Now Click on Edit channel

Go to Integrations and Click on Create webhook

Now You Can Edit The Bot As Per Your Preferences

Now copy the webhook URL and click on save changes

Now You have to install a tool 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.

Command: go install github.com/projectdiscovery/notify/cmd/notify@latest

In the Tool Description they have provided with a config file

Which can be created at $HOME/.config/notify/provider-config.yaml

With the following content

You can comment out everything except the discord part

#slack:
# - id: "slack"
# slack_channel: "recon"
# slack_username: "test"
# slack_format: "{{data}}"
# slack_webhook_url: "https://hooks.slack.com/services/XXXXXX"
#
# - id: "vulns"
# slack_channel: "vulns"
# slack_username: "test"
#slack_format: "{{data}}"
# slack_webhook_url: "https://hooks.slack.com/services/XXXXXX"

discord:
- id: "crawl"
discord_channel: "crawl"
discord_username: "test"
discord_format: "{{data}}"
discord_webhook_url: "https://discord.com/api/webhooks/XXXXXXXX"

# - id: "subs"
# discord_channel: "subs"
# discord_username: "test"
# discord_format: "{{data}}"
#s discord_webhook_url: "https://discord.com/api/webhooks/XXXXXXXX"

#telegram:
# - id: "tel"
# telegram_api_key: "XXXXXXXXXXXX"
# telegram_chat_id: "XXXXXXXX"
# telegram_format: "{{data}}"
# telegram_parsemode: "Markdown" # None/Markdown/MarkdownV2/HTML (https://core.telegram.org/bots/api#formatting-options)

#pushover:
#- id: "push"
# pushover_user_key: "XXXX"
# pushover_api_token: "YYYY"
# pushover_format: "{{data}}"
# pushover_devices:
# - "iphone"

#smtp:
#- id: email
# smtp_server: mail.example.com
# smtp_username: [email protected]
# smtp_password: password
# from_address: [email protected]
# smtp_cc:
# - [email protected]
# smtp_format: "{{data}}"
# subject: "Email subject"
# smtp_html: false
#smtp_disable_starttls: false

#googlechat:
# - id: "gc"
# key: "XXXXXXXX"
# token: "XXXXXX"
# space: "XXXXXX"
# google_chat_format: "{{data}}"

#teams:
# - id: "recon"
# teams_webhook_url: "https://<domain>.webhook.office.com/webhookb2/xx@xx/IncomingWebhook/xx"
# teams_format: "{{data}}"

#custom:
# - id: webhook
# custom_webhook_url: http://host/api/webhook
# custom_method: GET
# custom_format: '{{data}}'
# custom_headers:
# Content-Type: application/json
# X-Api-Key: XXXXX
#
#custom:
# - id: webhookJson
# custom_webhook_url: http://host/api/webhook
# custom_headers:
# Content-Type: application/json
# X-Api-Key: XXXXX

#custom:
# - id: webhook
# custom_webhook_url: http://host/api/webhook
# custom_method: GET
# custom_sprig: '{"text":"{{ .url }}"}'
# custom_headers:
# Content-Type: application/json
# X-Api-Key: XXXXX

Now you can paste your webhook URL here

And You’re Done!!

To make it work you just need to add-:

notify --silent

For Example-

You can see I got the notification

Another Example:

subfinder -d hackerone.com | notify

On running this command:

We get the results!!

We can also use this tool for many other platforms like

  • Slack / Discord / Telegram
  • Pushover / Email
  • Microsoft Teams / Google Chat

Here are some references for that:

Thank you for reading till the end

Please Consider following and liking.

You can also support me through:


文章来源: https://infosecwriteups.com/find-bugs-while-sleeping-get-phone-notifications-when-a-bug-is-found-b06ef95a6df7?source=rss----7b722bfd1b8d--bug_bounty
如有侵权请联系:admin#unsafe.sh