forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


vdsipp and blowfish question

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue May 06, 2003 6:59 pm    Post subject: vdsipp and blowfish question Reply with quote

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 Sad 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 Sad


thanks

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
Hortalonus
Valued Contributor
Valued Contributor


Joined: 15 Mar 2002
Posts: 344
Location: Western USA

PostPosted: Tue May 06, 2003 7:07 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue May 06, 2003 7:12 pm    Post subject: Reply with quote

ahhhhh kkk well i change that that fixed one error Smile still not working right Sad
_________________
Have a nice day Smile
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue May 06, 2003 7:22 pm    Post subject: Reply with quote

i think this is what making me have problems


Code:

if @GREATER(@INTERNET(HTTP,CONTENT-LENGTH,1),0)

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Tue May 06, 2003 7:22 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue May 06, 2003 7:30 pm    Post subject: Reply with quote

well i tried that and i get a error at this line :

Code:

 LIST CREATE,1


error is :

error code 608

error: exception

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
Hortalonus
Valued Contributor
Valued Contributor


Joined: 15 Mar 2002
Posts: 344
Location: Western USA

PostPosted: Tue May 06, 2003 7:30 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Tue May 06, 2003 7:38 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue May 06, 2003 7:46 pm    Post subject: Reply with quote

ok i'am getting closer Smile my list now just loads a blank page no eorrors Smile


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 Smile
Back to top
View user's profile Send private message
Hortalonus
Valued Contributor
Valued Contributor


Joined: 15 Mar 2002
Posts: 344
Location: Western USA

PostPosted: Tue May 06, 2003 7:56 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue May 06, 2003 8:00 pm    Post subject: Reply with quote

ahhhhhhhhhh kk

yup i got it to work Smile


thanks guys for the help Smile

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Tue May 06, 2003 9:33 pm    Post subject: Reply with quote

No problem. Wink
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Hortalonus
Valued Contributor
Valued Contributor


Joined: 15 Mar 2002
Posts: 344
Location: Western USA

PostPosted: Tue May 06, 2003 9:35 pm    Post subject: Reply with quote

Glad to be of service. Very Happy
_________________
"ah, come take my hand... we're ridin' out tonight to face the promised land"
Get a free iPod mp3 player...
Back to top
View user's profile Send private message Send e-mail
arcray
Valued Contributor
Valued Contributor


Joined: 13 Jul 2001
Posts: 242
Location: Aude, France

PostPosted: Wed May 07, 2003 7:25 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Wed May 07, 2003 7:15 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
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

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group