Command-line file download helper, generating scripts for copy/pasting :)
Ex.: I have 3 files I need to do remote administration on a several servers; but SSH, SMB, nor drag/drop RDP is unavailable. I know that httpclient file transfer via powershell works, but I am too lazy to copy-paste stuff over and over again - so I want to do it in 1 go, now I can.
-
Put the downloady.py in the same folder as the files you're downloading to the remote folder
-
Find your private IP (for this example it will be 10.1.1.1)
-
Run the downloady.py
-
Start the http.server in the same directory as other files (python3 -m http.server 4040)
-
Paste the command generated by downloady into the remote host & check to see if you got the file downloaded
Example downloady commands:
- python3 downloady.py webrequest http://10.1.1.1/file.txt psdocuments
- python3 downloady.py all http://10.1.1.1:4040/ all -f files.txt
- python3 downloady.py lolw http://10.1.1.1/ ps -f files.txt
python3 downloady.py httpclient http://10.1.1.1/ psdocuments -f files.txt
_ _ _
__| | _____ ___ __ | | ___ __ _ __| |_ _
/ _` |/ _ \ \ /\ / / '_ \| |/ _ \ / _` |/ _` | | | |
| (_| | (_) \ V V /| | | | | (_) | (_| | (_| | |_| |
\__,_|\___/ \_/\_/ |_| |_|_|\___/ \__,_|\__,_|\__, |
|___/
-by VeeTe
Usage:
1. Put the downloady.py in the same folder as the files you're downloading to the remote folder
2. Find your private IP (for this example it will be 10.1.1.1)
3. Run the downloady.py
4. Start the http.server in the same directory as other files (python3 -m http.server 4040)
5. Paste the command generated by downloady into the remote host & check to see if you got the file downloaded
Example downloady commands:
python3 downloady.py webrequest http://10.1.1.1/file.txt psdocuments
python3 downloady.py all http://10.1.1.1:4040/ all -f files.txt
python3 downloady.py lolw http://10.1.1.1/ ps -f files.txt
Local Filename: s.ps1 -> Remote Filename: utedqs.ps1
Download URL: http://10.1.1.1/s.ps1 Output to: "C:\Users\$env:USERNAME\Documents\utedqs.ps1"
$httpClient = New-Object System.Net.Http.HttpClient; $response = $httpClient.GetAsync("http://10.1.1.1/s.ps1").Result; $response.Content.ReadAsByteArrayAsync().Result | Set-Content -Path "C:\Users\$env:USERNAME\Documents\utedqs.ps1"-Encoding Byte
Local Filename: asdfasdfafasdf.exe -> Remote Filename: adfffs.exe
Download URL: http://10.1.1.1/asdfasdfafasdf.exe Output to: "C:\Users\$env:USERNAME\Documents\adfffs.exe"
$httpClient = New-Object System.Net.Http.HttpClient; $response = $httpClient.GetAsync("http://10.1.1.1/asdfasdfafasdf.exe").Result; $response.Content.ReadAsByteArrayAsync().Result | Set-Content -Path "C:\Users\$env:USERNAME\Documents\adfffs.exe"-Encoding Byte
Local Filename: 1.pdf -> Remote Filename: ehyzy1.pdf
Download URL: http://10.1.1.1/1.pdf Output to: "C:\Users\$env:USERNAME\Documents\ehyzy1.pdf"
$httpClient = New-Object System.Net.Http.HttpClient; $response = $httpClient.GetAsync("http://10.1.1.1/1.pdf").Result; $response.Content.ReadAsByteArrayAsync().Result | Set-Content -Path "C:\Users\$env:USERNAME\Documents\ehyzy1.pdf"-Encoding Byte
Save as 'downloady_20230927_180659.txt'? (Y/n) Y
File has been saved successfuly.
s.ps1
asdfasdfafasdf.exe
1.pdf
$httpClient = New-Object System.Net.Http.HttpClient; $response = $httpClient.GetAsync("http://10.1.1.1/s.ps1").Result; $response.Content.ReadAsByteArrayAsync().Result | Set-Content -Path "C:\Users\$env:USERNAME\Documents\vecsas.ps1"-Encoding Byte
$httpClient = New-Object System.Net.Http.HttpClient; $response = $httpClient.GetAsync("http://10.1.1.1/asdfasdfafasdf.exe").Result; $response.Content.ReadAsByteArrayAsync().Result | Set-Content -Path "C:\Users\$env:USERNAME\Documents\dfdfff.exe"-Encoding Byte
$httpClient = New-Object System.Net.Http.HttpClient; $response = $httpClient.GetAsync("http://10.1.1.1/1.pdf").Result; $response.Content.ReadAsByteArrayAsync().Result | Set-Content -Path "C:\Users\$env:USERNAME\Documents\qbgkl1.pdf"-Encoding Byte
Don't be an idiot and be responsible with usage. Pentesting without authorization is illegal.
- General Use: This software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
- Potential Misuse: The software is designed for legitimate purposes only. Any misuse, including but not limited to illegal, unethical, or unauthorized activities, is strictly discouraged and not the intention of the developers.
- User Responsibility: Any person, entity, or organization choosing to use this software bears the full responsibility for its actions while using the software. It is the user's responsibility to ensure that their use of this software complies with local, state, national, and international laws and regulations.
- No Liability: The creators, developers, and distributors of this software are not responsible for any harm or damage caused, directly or indirectly, by the misuse or use of this software.
- Updates and Monitoring: The developers reserve the right to update, modify, or discontinue the software at any time. Users are advised to always use the most recent version of the software. However, even with updates, the developers cannot guarantee that the software is completely secure or free from vulnerabilities.
- Third-Party Software/Links: This software may contain links to third-party sites or utilize third-party software/tools. The developers are not responsible for the content or privacy practices of those sites or software.
- Unauthorized Access: Using "downloady" to access, probe, or connect to systems, networks, or data without explicit permission from appropriate parties is strictly discouraged, unethical, and illegal. Unauthorized access to systems, networks, or data breaches various local, national, and international laws, and can result in severe legal consequences. Always obtain the necessary permissions before accessing any systems or data. The developers of "downloady" disavow any actions taken by individuals or entities that use this software for unauthorized activities.
By downloading, installing, or using "downloady" you acknowledge that you have read, understood, and agreed to abide by this disclaimer. If you do not agree to these terms, do not use the software.