rejetto forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - daniel_boc

Pages: 1
1
HFS ~ HTTP File Server / File Upload Script
« on: January 31, 2018, 07:55:30 PM »
Hello,

I am trying to upload files via script. Is there any way to do this via powershell or curl?

I have tried via powershell with this :
#File to Send
$itemName="itemPath"

#http server
$http = "http://meu-ip"
$user = "user"
$pass = "passwd"
$webclient = New-Object System.Net.WebClient
$webclient.Credentials = New-Object System.Net.NetworkCredential($user,$pass) 


try{
$uri = New-Object System.Uri($http+"fileDestName.txt")
$webclient.UploadFile($uri, $itemName)}#end try

catch{
$err=$_
Write-Host $error.exception.message
}

but this return erro 404 - Not Found....

And i have tried with this in curl:

curl --user login:password --upload-file "filepath" http://meu-ip/namefile

but this return the same erro 404 - Not Found.



Pages: 1