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

Reworked bash script #11

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Reworked bash script #11

wants to merge 4 commits into from

Conversation

yarafie
Copy link
Contributor

@yarafie yarafie commented Apr 28, 2022

Reworked script:
1- made curls output quieter
2- changed logic to handle failed api calls
3- storing successfull apiurl in token.json to be used in future runs
4- added generation of config files for obfuscated and double servers
5- cleaned up print outs much cleaner.

yarafie added 4 commits April 27, 2022 11:22
Minor corrections
Reworked script:
1- made curls quit
2- changed logic to handle failed api calls
3- storing successfull apiurl in token.json to be used in future runs
4- added generation of config files for obfuscated and double servers
5- cleaned up print outs much cleaner.
Copy link
Owner

@yazdan yazdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my comment and let me know if you think it can be done or not?
It is a suggestion :)

@@ -17,12 +17,10 @@ read_config() {
sswg_log=${config_folder}/sswg.log

baseurl_1="https://api.surfshark.com"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move them to a json config file so every time a url changes we just change that file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eid mubarrak.

The urls ? Probably I can. e=Explain how you want it to work and ill see what I can do :;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move them to a json config file so every time a url changes we just change that file?

Thinking about your comment, the way I have it setup now is during the login (which is done during a full run no prarameters) it goes through the urls and will save the succesfull url with the token.json file. So when u run script again with the renew parameter (-n) it will use the same url.

@yarafie
Copy link
Contributor Author

yarafie commented May 16, 2022

Hello @yazdan I can move whatever you feel to be read from a json file.
Would you like me to use the same config.json file or create a new json file.
My feeling is just the same config.json file.

I will have to rework some logic to guard against someone not putting these values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants