* Detecting open Dropbear server
* Making code more readable
After testing it rigorously i have found that without the try and except the code doesn't work, so to improve the readability i have added some comments, also added is finally block to close the connection.
* Replaced try/except with if/else
As per the suggestions i have replaced try/except with if/else and i have ran multiple tests on my localhost to test and it is working.
* Made the code concise
I have made the suggested changes to the code to make it more concise and easy to read. I have taken time to test it and make sure it works( it does ).