upload default folders/files wiht ftp

You need help to start using UVK? You have a doubt on a UVK feature? Post here!
Forum rules
We have no special rules for UVK forums. Just try to be polite and clear in your posts.
Please don't post spam in this forum. Spammers will be banned by IP, e-mail and username.
We reserve the right to delete all posts and ban all users we consider not having respected these rules without warning.
Post Reply
csm
Posts: 19
Joined: Sat Oct 10, 2015 12:07 pm

upload default folders/files wiht ftp

Post by csm »

Hi,
First off all, i am using uvk now for several months and it works like a charm, didn’t have any problems with the program at all, great job Fred.

I was wondering if it’s possible to change the default folders and files which are uploaded with FTP to PCRT.
I had changed the folders and files and saved the changes at the options section.
But the next time I start uvk , the changes are back to normal.

I have made my own report in Dutch and, want to upload just the new report, not the old one ore other files and folders. I have tried to manual upload the new report in PCRT, and that worked.
Of course I can create a script that will upload the new report, but it would be nice if I can do it with uvk.

Is it possible ? I am doing something wrong?
report.jpg
report.jpg (215.6 KiB) Viewed 4177 times
Fred
Site Admin
Posts: 2357
Joined: Sat Jul 30, 2011 12:05 pm
Location: Red coast, France
Contact:

Re: upload default folders/files wiht ftp

Post by Fred »

Hi CSM. I'm not sure I understood what you need. Can you be more specific? The contents of the zip that is uploaded can not be changed, if that's what you mean. What files and folders are you talking about?
One thing we humans have in common is that we are all different. So, if you think you're weird because you're different from everyone else, then we are all weird.

Fred
csm
Posts: 19
Joined: Sat Oct 10, 2015 12:07 pm

Re: upload default folders/files wiht ftp

Post by csm »

Hi Fred, Yes, i mean the content of the zip file. Just need the new report file in the zip , not the uak scan/rem files and not the logs folder. But i'll understand that it's not possible.
So i have to make a script that's replacing te zip folder content.
Thanks anyway
Xander
Posts: 438
Joined: Sun May 24, 2015 11:55 pm
Contact:

Re: upload default folders/files wiht ftp

Post by Xander »

CSM, if you do that, could you post your script for the community? I'd be curious.

Fred is looking into including the saved report into the zip (viewtopic.php?f=9&t=1405) so I don't think it's impossible.
csm
Posts: 19
Joined: Sat Oct 10, 2015 12:07 pm

Re: upload default folders/files wiht ftp

Post by csm »

Hi Xander,

I can do that no problem. I know that Fred is integrating the reports, but I need them in Dutch and I wanted an better/nicer layout. I think I succeeded in that. :D
So what I am doing now is I made several third party apps and save the reports into a folder then I extract the content from those files and from the UVK log file and convert that to html.
So the only thing I need to do is to upload the new report to pcrt. Would be nice if I could tell uvk (through some ini file) to upload just that file.
I’ll understand now that this is not possible, so I have to make a script to save the report in zip and upload it to pcrt.
Fred
Site Admin
Posts: 2357
Joined: Sat Jul 30, 2011 12:05 pm
Location: Red coast, France
Contact:

Re: upload default folders/files wiht ftp

Post by Fred »

CSM, If you upload your reports from the Reporting section, you have full control over what you upload. You can remove all the files from the zip and add your own log, and then upload.
One thing we humans have in common is that we are all different. So, if you think you're weird because you're different from everyone else, then we are all weird.

Fred
csm
Posts: 19
Joined: Sat Oct 10, 2015 12:07 pm

Re: upload default folders/files wiht ftp

Post by csm »

Fred,
this is what I meant in my first question, I know that that is possible but I cannot save the setting I have made, so I have to do it after every new scan.
Fred
Site Admin
Posts: 2357
Joined: Sat Jul 30, 2011 12:05 pm
Location: Red coast, France
Contact:

Re: upload default folders/files wiht ftp

Post by Fred »

The problem is that UVK can not just guess how many files the report will contain, it depends on many factors, so it's impossible to save and load that info.

However, you can place your custom HTML report in the current user's desktop, and name it System Info. That way, it will be automatically included.
One thing we humans have in common is that we are all different. So, if you think you're weird because you're different from everyone else, then we are all weird.

Fred
csm
Posts: 19
Joined: Sat Oct 10, 2015 12:07 pm

Re: upload default folders/files wiht ftp

Post by csm »

Here is the script i promised, it's written in autoit.
The “system info.htm” has to be in the root of this script, the script will ask for a pcid number to identify it later in pcrt.

#include <MsgBoxConstants.au3>
#include <FileConstants.au3>

inputpcid()

Func inputpcid()

Local $pcid = InputBox("PCID", "Enter the PCID", "", "", _
- 1, -1, 0, 0)


$check = MsgBox(259, "pcid?", "Is this the correct PCID? " & $pcid)
If $check = 6 Then

ElseIf $check = 7 Then
inputpcid()
EndIf


Run('7za.exe -tzip a '&$pcid&' "system info.htm"') ; download 7zip and extract it in the root of this script


sleep (2000)

Run('winscp.com /script=ftp.txt') ; this will upload it to the uvk folder in pcrt, download winscp.exe and extract it to the root of this script, use your own setting in the ftp.txt
sleep (2000)
ProcessClose ("winscp.com")
ProcessWaitClose ("winscp.com")
FileDelete ("*.zip")
MsgBox(0, "Upload", "The upload was successful ") ; this doesn't check anything, just appears when the script has completed

EndFunc
Post Reply