Loading ...
Sorry, an error occurred while loading the content.
 

Re: [Clip] FTP clip (was Save and retrieve some folder path values)

Expand Messages
  • Harvey R. Savage
    ... Hi Andy, I pasted your clip into a clip library and made a ftp1.ini to get a better look. If you re serious about the security measures the quick answer is
    Message 1 of 10 , Aug 31, 2001
      Andy Young wrote:

      > Hi,
      >
      > The FTP.ini file holds information about
      > IP addresses and logins and passwords. It's not secure. However
      > myself and the clip are the only one who knows what file the
      > information is in. ... Hmm, any suggestions on how to encrypt and
      > decrypt the file? ... Below is the clip, FWIW, and an example of
      > what the ftp.ini file looks like
      >
      > Hmm ... after looking things over, ftpscript.txt also contains the
      > logon information. Is there a way to leave the file but to delete
      > the information in it (ftpscript.txt) without opening and closing
      > it? Thanks
      >
      > Andy

      Hi Andy,

      I pasted your clip into a clip library and made a ftp1.ini to get
      a better look.

      If you're serious about the security measures the quick answer is
      build a couple of clips, first to decrypt the files before use
      and another to encrypt again after you've completed your uploads.

      These clips could be stand-alone clips or be called (^!Clip) from
      the main clip or incorporated into the beginning and end of the
      "Up Load File to Web Site".

      The method for running the clips depends on how many files you
      may upload at 1 time or how long you maintenance session lasts.

      NoteTab features encryption/decryption that works pretty well,
      and quickly. It's not PGP but it wouldn't be real easy to
      crack.

      Everything you need is in NoteTab, clip language and
      encrypt/decrypt capabilities.

      There are probably several list members that would be glad to
      take a stab at it with you.

      I'll look for a few possibilities also and let you know.

      hrs
    • Harvey R. Savage
      ... Hi Andy, I wrote a clip to encrypt/decrypt both the ftp1.ini and ftpscript.txt. My clip is below yours. It is written specifically for those files in the
      Message 2 of 10 , Sep 1, 2001
        Andy Young wrote:
        >
        > Hi,
        >
        > The FTP.ini file holds information about
        > IP addresses and logins and passwords. It's not secure.
        >
        > Hmm ... after looking things over, ftpscript.txt also contains the
        > logon information. Is there a way to leave the file but to delete
        > the information in it (ftpscript.txt) without opening and closing
        > it? Thanks
        >
        > Andy
        >
        Hi Andy,

        I wrote a clip to encrypt/decrypt both the ftp1.ini and
        ftpscript.txt. My clip is below yours. It is written
        specifically for those files in the locations you specified.
        Works NEAT, and quickly, you'll barely notice the 2 files loading
        and closing.

        I added 4 lines at the top of your clip and 4 lines at the
        bottom. I also separated you ^$GetValue()$ functions for easier
        reading, just a personal preference.

        When you run your clip you'll get a wizard at the start that
        gives you a preselected choice to decrypt the 2 files. The files
        should be encrypted before you run your clip. You'll get the
        same wizard at the end of your clip with a preselected choice to
        encrypt the 2 files. When your clip finishes both files will be
        in an encrypted, secure state.

        Last, there are 2 short clips at the bottom to encrypt a focused
        file before starting to use your modified clip. There is also a
        decrypt clip in case you need it.

        If you don't use these at least you might get some idea of
        another method.



        ---------< start 1st clip long lines separated by blank
        lines>---------
        H="Up Load File to Web Site"
        ;Andy Young <ajyoung@...>
        ;08/31/2001, 11:27:36 PM
        ^!ClearVariables
        ;
        ;added lines to decrypt ftp1.ini, ftpscript.txt
        ^!Set %p_decrypt%=_
        ^!Clip "encrypt/decrypt/all"
        ^!Set %p_decrypt%=^%Empty%
        ;
        ;declare the file that contains information
        ;Transfer information from file to variables in the clip
        ;
        ^!SetIniFile "^$GetAppPath$FTP1.ini"
        ^!Set %Computer%="^$GetValue("FTP:Computer")$"
        ^!Set %UserName%="^$GetValue("FTP:UserName")$"
        ^!Set %Password%="^$GetValue("FTP:Password")$"
        ^!Set %CaptureOutput%="^$GetValue("FTP:CaptureOutput")$"
        ^!Set %Command%="^$GetValue(FTP:Command)$"
        ^!Set %ScriptName%="^$GetValue("FTP:ScriptName")$"
        ;
        ^!SetIniFile
        ;
        ; get name and path of active document
        ^!Set %FileName%=^$GetDocName$
        ^!Set %LocalFolder%=^$GetPath(^%FileName%)$
        ;
        ; define document type, change to binary for images
        ^!Set %FileType%=ascii
        ;
        ;Adjust document directory to match website directory
        ^!Set %RemoteFolder%=^$StrReplace("D:\My
        Documents\WWWDEV\";"WWW";"^%LocalFolder%";False;False)$
        ;
        ^!Set
        %RemoteFolder%=^$StrReplace("\";"/";"^%RemoteFolder%";False;False)$
        ;
        ;adjust filename and path to lowercase to match server
        ^!Set %RemoteFolder%=^$StrLower(^%RemoteFolder%)$
        ;
        ;Send information to file for ftp.exe to read. This is a program
        ;came with windows
        ;
        ^!TextToFile "^%ScriptName%"
        open^%space%^%Computer%^%NL%^%UserName%^%NL%^%Password%^%NL%cd^%space%^%RemoteFolder%^%NL%^%FileType%^%NL%put^%space%^%FileName%^%NL%quit
        ;
        ;Send ftp command to ftp.exe and capture output
        ^!Set %Output%=^$GetOutput("^%Command%")$
        ;show results of ftp process
        ^!Info ^%Output%
        ;
        ;added lines to re-encrypt ftp1.ini, ftpscript.txt
        ^!Set %p_encrypt%=_
        ^!Clip "encrypt/decrypt/all"
        ^!Set %p_encrypt%=^%Empty%
        ;
        ^!ClearVariables
        ---------< end 1st clip >-----------


        I didn't need the ^!Delay's but added them just in case

        ---------< start 2nd clip long lines separated by blank
        lines>---------
        H="_encrypt/decrypt/all"
        ^!Goto ^?{Encrypt/Decrypt
        INI==^%p_decrypt%DECRYPT|^%p_encrypt%ENCRYPT|DON'T CHANGE^=END}
        ;
        :ENCRYPT
        ^!Open "^$GetAppPath$ftp1.ini"
        ;^!Delay 5
        ^!Select ALL
        ^$StrEncrypt("^$GetSelection$";)$
        ^!Close Save
        ;
        ^!Open "c:\ftpscript.txt"
        ;^!Delay 5
        ^!Select ALL
        ^$StrEncrypt("^$GetSelection$";)$
        ^!Close Save
        ;
        ^!Goto END
        ;
        :DECRYPT
        ^!Open "^$GetAppPath$ftp1.ini"
        ;^!Delay 5
        ^!Select ALL
        ^$StrDecrypt("^$GetSelection$";)$
        ^!Close Save
        ;
        ^!Open "c:\ftpscript.txt"
        ;^!Delay 5
        ^!Select ALL
        ^$StrDecrypt("^$GetSelection$";)$
        ^!Close Save
        :END
        ---------< end 2nd clip >-----------


        h="enc..."
        ^!Select ALL
        ^$StrEncrypt("^$GetSelection$";)$


        h="dec..."
        ^!Select ALL
        ^$StrDecrypt("^$GetSelection$";)$
      • thefrank
        I would like a few specific examples of why encrypted ftp.ini is important. What are the risks to not encrypt. Is this LAN related? Regards, tf
        Message 3 of 10 , Sep 2, 2001
          I would like a few specific examples of why encrypted ftp.ini is
          important. What are the risks to not encrypt. Is this LAN related?

          Regards,

          tf

          > > The FTP.ini file holds information about
          > > IP addresses and logins and passwords. It's not secure.
          > > Andy
        • Andy Young
          Hi, Harvey & Frank ... Thanks for the additional lines and work. I ve never wrote or worked with a clip that used NTP s encryption. I ll look the clip over and
          Message 4 of 10 , Sep 2, 2001
            Hi, Harvey & Frank

            > Harvey said,
            > I wrote a clip to encrypt/decrypt both the ftp1.ini and
            > ftpscript.txt.

            Thanks for the additional lines and work. I've never wrote or worked
            with a clip that used NTP's encryption. I'll look the clip over and
            read up some more. Children are home from college so I'm doing other
            things. Thanks again.

            > Frank said,
            > I would like a few specific examples of why encrypted ftp.ini is
            > important. What are the risks to not encrypt. Is this LAN related?

            I would assume if you share a computer or stay connected to a LAN
            you might want to use encryption, considering my FTP.ini contains
            usernames and passwords for several websites. I don't worry about it
            on my computer but I thought I'd mention that the clip was not
            secure. Some people are more concerned about that than others. And
            then I thought, why not try to make it more secure? Others who
            regularly use encryption might give more useful information.

            Andy
          Your message has been successfully submitted and would be delivered to recipients shortly.