| View previous topic :: View next topic |
| Author |
Message |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Tue May 06, 2003 6:59 pm Post subject: vdsipp and blowfish question |
|
|
hello all
i was playing with blowfish and vdsipp i have a question if a person has a txt file that is encryted how can you make vdsipp decryted then show it in a list? meaning this:
| Code: |
internet http,get,1,%%whateversurl
%%dec100 = @Blowfish(DecryptFile,test,c:\whatever\download2.txt,c:\whatever\download.txt)
LIST CREATE,1
if @GREATER(@INTERNET(HTTP,CONTENT-LENGTH,1),0)
rem LIST ADD,1,@INTERNET(HTTP,CONTENT,1)
list clear,L1
LIST ADD,1,c:\whatever\download.txt
|
| Code: |
:HTTP1ONGETDONE
LIST CREATE,4
rem LIST ADD,4,@INTERNET(HTTP,CONTENT,1)
LIST ADD,4,%%dec100
dialog select, 0
LIST CLEAR,L1
LIST ASSIGN,L1,4
LIST CLOSE,4
%%Downloading = No
|
this above code does NOT work right...i can however make it work BUT then the txt file is encryted how can i make it decryted?
p.s i have tried many diff ways to have it decryted it then show it in a list but no luck yet
thanks _________________ Have a nice day  |
|
| Back to top |
|
 |
Hortalonus Valued Contributor


Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Tue May 06, 2003 7:07 pm Post subject: |
|
|
Hey Tim,
You need to use the INTERNET HTTP,DOWNLOAD command instead of the INTERNET HTTP,GET command. That will save the file to disk, then you can decrypt it. You can't decrypt a file from the harddrive if you have only retrieved it to the memory buffer. _________________ "ah, come take my hand... we're ridin' out tonight to face the promised land"
Get a free iPod mp3 player... |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Tue May 06, 2003 7:12 pm Post subject: |
|
|
ahhhhh kkk well i change that that fixed one error still not working right  _________________ Have a nice day  |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Tue May 06, 2003 7:22 pm Post subject: |
|
|
i think this is what making me have problems
| Code: |
if @GREATER(@INTERNET(HTTP,CONTENT-LENGTH,1),0)
|
_________________ Have a nice day  |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Tue May 06, 2003 7:22 pm Post subject: |
|
|
Try this:
| Code: | internet http,download,1,%%whateversurl,c:\whatever\download.txt
%%dec100 = @Blowfish(DecryptFile,test,c:\whatever\download.txt,c:\whatever\download2.txt)
LIST CREATE,1
rem -- I think download2.txt is decrypted now --
LIST LOADFILE,1,c:\whatever\download2.txt |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Tue May 06, 2003 7:30 pm Post subject: |
|
|
well i tried that and i get a error at this line :
error is :
error code 608
error: exception _________________ Have a nice day  |
|
| Back to top |
|
 |
Hortalonus Valued Contributor


Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Tue May 06, 2003 7:30 pm Post subject: |
|
|
Good example FF... Make the process as simple as possible, Tim.
Download the encrypted file to the harddrive
Decrypt the file
Load the file into your list
Also, his code assumes you haven't used LIST CREATE,1 in your code yet. _________________ "ah, come take my hand... we're ridin' out tonight to face the promised land"
Get a free iPod mp3 player... |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Tue May 06, 2003 7:38 pm Post subject: |
|
|
OK, Tim, try this:
- Be sure that you have threads OFF with INTERNET HTTP,1,THREADS,OFF
- Make sure the file is fully downloaded before loading it into the list.
That's what turning off threads will help with.
- And as Hortalonus said, make sure that you use LIST CLOSE,1 if you are doing this more than once in your script.
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Tue May 06, 2003 7:46 pm Post subject: |
|
|
ok i'am getting closer my list now just loads a blank page no eorrors
do i have to chnage/added anything on here:
| Code: |
:HTTP1ONGETDONE
LIST CREATE,4
rem LIST ADD,4,@INTERNET(HTTP,CONTENT,1)
LIST ADD,4,%%dec100
dialog select, 0
rem LIST CREATE,L1
LIST CLEAR,L1
LIST ASSIGN,L1,4
rem dialog select, 1
LIST CLOSE,4
%%Downloading = No
|
_________________ Have a nice day  |
|
| Back to top |
|
 |
Hortalonus Valued Contributor


Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Tue May 06, 2003 7:56 pm Post subject: |
|
|
If you have turned threads off in the VDSIPP extension, that event won't even be triggered. If you turn threads on, since you're using the INTERNET HTTP,DOWNLOAD command, you don't even need to have a routine for the HTTP1ONGETDONE event. You may need a routine for the HTTP1ONDOWNLOADDONE event depending on if you want to do anything when it is done downloading. _________________ "ah, come take my hand... we're ridin' out tonight to face the promised land"
Get a free iPod mp3 player... |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Tue May 06, 2003 8:00 pm Post subject: |
|
|
ahhhhhhhhhh kk
yup i got it to work
thanks guys for the help  _________________ Have a nice day  |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Tue May 06, 2003 9:33 pm Post subject: |
|
|
No problem.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Hortalonus Valued Contributor


Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Tue May 06, 2003 9:35 pm Post subject: |
|
|
Glad to be of service.  _________________ "ah, come take my hand... we're ridin' out tonight to face the promised land"
Get a free iPod mp3 player... |
|
| Back to top |
|
 |
arcray Valued Contributor


Joined: 13 Jul 2001 Posts: 242 Location: Aude, France
|
Posted: Wed May 07, 2003 7:25 am Post subject: |
|
|
Could you publish the solution here?
So that we can all see how it was done? _________________ Andrew GRAY
If you don't know I am looking for work, I won't get the job.
andrewrcgray.com |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Wed May 07, 2003 7:15 pm Post subject: |
|
|
sure
here is what i did
| Code: |
internet http,create,1
internet http,threads,1,off
internet http,protocol,1,1
etc
|
| Code: |
%%downloadsurl = http://www.whatever.com/whatever2.txt
internet http,download,1,%%downloadsurl,c:\whatever\whatever2.txt
%%dec100 = @Blowfish(DecryptFile,test,c:\whatever\whatever2.txt,c:\whatever\whatever.txt)
LIST CREATE,1
if @GREATER(@INTERNET(HTTP,CONTENT-LENGTH,1),0)
list clear,L1
LIST loadfile,L1,c:\whatever\whatever.txt
else
rem do what ever you want if file is not found
list close,L1
end
|
i had this worng
| Code: |
LIST loadfile,L1,c:\whatever\whatever.txt
|
i had this
| Code: |
LIST loadfile,1,c:\whatever\whatever.txt
|
which was wrong for me...
sorry i would have posted sooner but i didn't see the last post... _________________ Have a nice day  |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|