diff --git a/README.md b/README.md index 29c1c3d..9e003ba 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,20 @@ # bashbot A Telegram bot written in bash. -Depends on [tmux](http://github.com/tmux/tmux). -Uses [JSON.sh](http://github.com/dominictarr/JSON.sh). - -For full UTF-8 support you need [python on your system](doc/4_expert.md#UTF-8-Support) (optional). - Written by Drew (@topkecleon), Daniil Gentili (@danogentili), and Kay M (@gnadelwartz). Contributions by JuanPotato, BigNerd95, TiagoDanin, and iicc1. -Bashbot [Documentation](https://github.com/topkecleon/telegram-bot-bash) and [Downloads](https://github.com/topkecleon/telegram-bot-bash/releases) are availible on Githup. - Released to the public domain wherever applicable. Elsewhere, consider it released under the [WTFPLv2](http://www.wtfpl.net/txt/copying/). +## Prerequsites +Depends on [tmux](http://github.com/tmux/tmux). +Uses [JSON.sh](http://github.com/dominictarr/JSON.sh). +For full UTF-8 support you need [python on your system](doc/4_expert.md#UTF-8-Support) (optional). + +Bashbot [Documentation](https://github.com/topkecleon/telegram-bot-bash) and [Downloads](https://github.com/topkecleon/telegram-bot-bash/releases) are availible on www.github.com ## Install bashbot 1. Go to the directory you want to install bashbot, e.g. @@ -28,7 +27,9 @@ Elsewhere, consider it released under the [WTFPLv2](http://www.wtfpl.net/txt/cop 3. Change to directory ```telegram-bot.bash```, run ```./bashbot.sh init``` and follow the instructions. At this stage you are asked for your Bots token given by botfather. ## Update bashbot -[Download latest update zip from github](https://github.com/topkecleon/telegram-bot-bash/releases), extract all files and copy them to your bashbot dir. Now run ```sudo ./bashbot.sh init``` to setup your environment for the new release. +1. [Download latest update zip from github](https://github.com/topkecleon/telegram-bot-bash/releases) +2. Extract all files and copy them to your bashbot dir +3. Run ```sudo ./bashbot.sh init``` to setup your environment after the update- ## Bashbot Documentation * [Create a new Telegram Bot with botfather](doc/1_firstbot.md) @@ -87,7 +88,7 @@ For the same reason ervery file your Bot can read is in danger to be disclosed. Everyone with read access to your Bot files can extract your Bots data. Especially your Bot Token in ```token``` must be protected against other users. No one exept you must have write access to the Bot files. The Bot must be restricted to have write access to ```count``` and ```tmp-bot-bash``` only, all other files must be write protected. -To set access rights for your bashbot directory to a reasonable default you must run ```sudo ./bashbot.sh init``` after every update or change to your installation directory. +To set access rights for your bashbot installation to a reasonable default run ```sudo ./bashbot.sh init``` after every update or change to your installation directory. ### Is this Bot insecure? Bashbot is not more (in)secure as any other Bot written in any other language, we have done our best to make it as secure as possible. But YOU are responsible for the bot commands you wrote and you should know about the risks ... @@ -96,4 +97,4 @@ Bashbot is not more (in)secure as any other Bot written in any other language, w If you feel that there's something missing or if you found a bug, feel free to submit a pull request! -#### $$VERSION$$ v0.60-rc2-5-g591c583 +#### $$VERSION$$ v0.60-rc2-6-g2e3c975 diff --git a/README.txt b/README.txt index cad88e9..2366bdd 100644 --- a/README.txt +++ b/README.txt @@ -3,23 +3,26 @@ bashbot A Telegram bot written in bash. +Written by Drew (@topkecleon), Daniil Gentili (@danogentili), and Kay M +(@gnadelwartz). + +Contributions by JuanPotato, BigNerd95, TiagoDanin, and iicc1. + +Released to the public domain wherever applicable. Elsewhere, consider +it released under the http://www.wtfpl.net/txt/copying/[WTFPLv2]. + +Prerequsites +~~~~~~~~~~~~ + Depends on http://github.com/tmux/tmux[tmux]. Uses http://github.com/dominictarr/JSON.sh[JSON.sh]. For full UTF-8 support you need link:doc/4_expert.md#UTF-8-Support[python on your system] (optional). -Written by Drew (@topkecleon), Daniil Gentili (@danogentili), and Kay M -(@gnadelwartz). - -Contributions by JuanPotato, BigNerd95, TiagoDanin, and iicc1. - Bashbot https://github.com/topkecleon/telegram-bot-bash[Documentation] and https://github.com/topkecleon/telegram-bot-bash/releases[Downloads] -are availible on Githup. - -Released to the public domain wherever applicable. Elsewhere, consider -it released under the http://www.wtfpl.net/txt/copying/[WTFPLv2]. +are availible on www.github.com Install bashbot ~~~~~~~~~~~~~~~ @@ -39,10 +42,11 @@ given by botfather. Update bashbot ~~~~~~~~~~~~~~ -https://github.com/topkecleon/telegram-bot-bash/releases[Download latest -update zip from github], extract all files and copy them to your bashbot -dir. Now run `sudo ./bashbot.sh init` to setup your environment for the -new release. +1. https://github.com/topkecleon/telegram-bot-bash/releases[Download +latest update zip from github] +2. Extract all files and copy them to your bashbot dir +3. Run `sudo ./bashbot.sh init` to setup your environment after the +update- Bashbot Documentation ~~~~~~~~~~~~~~~~~~~~~ @@ -137,8 +141,8 @@ users. No one exept you must have write access to the Bot files. The Bot must be restricted to have write access to `count` and `tmp-bot-bash` only, all other files must be write protected. -To set access rights for your bashbot directory to a reasonable default -you must run `sudo ./bashbot.sh init` after every update or change to +To set access rights for your bashbot installation to a reasonable +default run `sudo ./bashbot.sh init` after every update or change to your installation directory. Is this Bot insecure? @@ -155,5 +159,5 @@ That's it! If you feel that there's something missing or if you found a bug, feel free to submit a pull request! -latexmath:[\[VERSION\]] v0.60-rc2-5-g591c583 +latexmath:[\[VERSION\]] v0.60-rc2-6-g2e3c975 ++++++++++++++++++++++++++++++++++++++++++++ diff --git a/bashbot.sh b/bashbot.sh index fdc7123..c3fcc5a 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -10,7 +10,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # -#### $$VERSION$$ v0.60-rc2-5-g591c583 +#### $$VERSION$$ v0.60-rc2-6-g2e3c975 # # Exit Codes: # - 0 sucess (hopefully) @@ -176,11 +176,14 @@ send_message() { sent=y fi if [ "$keyboard" != "" ]; then + if [[ "$keyboard" != *"["* ]]; then # pre 0.60 style + keyboard="[ ${keyboard//\" \"/\" , \"} ]" + fi send_keyboard "$chat" "$text" "$keyboard" sent=y fi if [ "$file" != "" ]; then - send_file "$chat" "$file" "" + send_file "$chat" "$file" "$text" sent=y fi if [ "$lat" != "" ] && [ "$long" != "" ] && [ "$address" = "" ] && [ "$title" = "" ]; then diff --git a/question b/question index d4d3fb0..2c969a9 100755 --- a/question +++ b/question @@ -3,7 +3,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) -#### $$VERSION$$ v0.60-rc2-5-g591c583 +#### $$VERSION$$ v0.60-rc2-6-g2e3c975 # adjust your language setting here # https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment