Good evening.
I have been working on a project recently and thought it may be time to share it with the community.
Minus a few test runs here and there, this is essentially my first python project and would appreciate the feedback, especially with error handling as I'm certain the blood of a few python wizards will soon boil.
We had to include a few various different elements to pass the criteria, and quite frankly I wanted to get into Python classes early. It will only work when connecting to Linux distributions as of yet, with Windows expected to be implemented in the next few weeks once I have some free time.
The progress bar displays twice for some reason too, so if anyone fancies helping me out that would be appreciated. The banner grab is also fairly unpredictable for reasons unknown.
It would be worth changing the self.Str in line 145 to a path on the remote system
Also change the SFTP local and remote host paths as required
(Line 201, 202)
Usage:
Insert IP, Port, User and Pass
Hit 1 : The Bad Samaritan
Enter commands into the loop
Break the loop with 'Disconnect'
Verify string
Make connection and send string to server, outputting response to file
Hit 2: The Retrieval Job
Verify file transferred to local machine successfully
So without further ado
Feel free to edit, modify, study the code as you see fit
Feedback welcome.
Credit to Sergeant Sploit for the knowledge kindly shared a good few months back now. Thank you my friend.
7 Responses
Visually appealing code..
Tests to come. Ill beat on it for ya some later, get back to you. I'm way backlogged and adding more. ;-P
No rush all Hitcher, whenever you're ready. I mean its fairly simplistic at the moment but if you have any suggestions to improve certain aspects, id love to hear your thoughts.
It's awesome that you can just make these things! I also very much appreciate the comments in the code.
Yeah i'm not going to deny the fact that it felt good when i tested it for the first time, knowing it was a product of my own creation.
You're most welcome, Cameron
As did I for my scripts... as Cx2H said, "I feel like a new daddy everytime I create something new..."
...or just ssh root@192.168.1.46...
But, the effort is much appreciated.
Perhaps, If I had every intention of stopping there C|H
Its more of a on the go tool anyway, executed on a phone or the alike whilst on business/travelling.
Quickly crafting the file, retrieving it and then viewing it at you own leisure, or at least that's the idea.
Even if it sparks one person to have an idea which enhances the program drastically in some way, then my job here is done.
Share Your Thoughts