secure uploading

Discussion in 'Python' started by macaronikazoo, Jul 16, 2005.

  1. hi
    i'm after a way to securely upload a file to a web server and I'm
    wondering how to go about it. basically i want to upload a small text
    file to my hosted webspace once every hour or so. because it will be
    happening once an hour, i want to make sure the transaction is
    encrypted, but i don't really know how to do this. can someone point
    me in the right direction?

    i'm a reasonably noob scripter so go easy on me. :) thanks!
    -h.
     
    macaronikazoo, Jul 16, 2005
    #1
    1. Advertising

  2. macaronikazoo

    Paul Rubin Guest

    "macaronikazoo" <> writes:
    > i'm after a way to securely upload a file to a web server and I'm
    > wondering how to go about it. basically i want to upload a small text
    > file to my hosted webspace once every hour or so. because it will be
    > happening once an hour, i want to make sure the transaction is
    > encrypted, but i don't really know how to do this. can someone point
    > me in the right direction?


    Use SSL/TLS. It's not a scripting thing, just set up your server to
    enable encryption. If you use apache, http://modssl.org might get you
    started.
     
    Paul Rubin, Jul 16, 2005
    #2
    1. Advertising

  3. well I want a script to upload something automatically, so i need a
    python script to do that for me. my hoster has ssl enabled on their
    server and I have generated a key. but now I need to know how to
    upload something using ssl to the server. how to I ftp something to
    the server using ssl?
    thanks.
     
    macaronikazoo, Jul 17, 2005
    #3
  4. macaronikazoo

    Paul Rubin Guest

    "macaronikazoo" <> writes:
    > well I want a script to upload something automatically, so i need a
    > python script to do that for me. my hoster has ssl enabled on their
    > server and I have generated a key. but now I need to know how to
    > upload something using ssl to the server. how to I ftp something to
    > the server using ssl?


    Ftp is not usually done over ssl. Usually you'd use http over ssl.
     
    Paul Rubin, Jul 17, 2005
    #4
  5. ok, so what can I do to get something uploaded? how can I upload
    something via http?
     
    macaronikazoo, Jul 17, 2005
    #5
  6. macaronikazoo

    Paul Rubin Guest

    "macaronikazoo" <> writes:
    > ok, so what can I do to get something uploaded? how can I upload
    > something via http?


    Depends on your web host. At worst, use a server side script to
    accept the upload. You're asking basic webmaster-type questions.
    This really isn't the best place for those.
     
    Paul Rubin, Jul 17, 2005
    #6
  7. oh ok cool. I'll ask them for some advice. thanks!
     
    macaronikazoo, Jul 17, 2005
    #7
  8. macaronikazoo

    Jorgen Grahn Guest

    On 16 Jul 2005 18:28:33 -0700, macaronikazoo <> wrote:
    > well I want a script to upload something automatically, so i need a
    > python script to do that for me.


    Well, you need /something/. If you are on a Unix machine, you'd be better
    off with a cron job.

    > my hoster has ssl enabled on their
    > server and I have generated a key. but now I need to know how to
    > upload something using ssl to the server. how to I ftp something to
    > the server using ssl?


    Are you sure your hoster doesn't provide ssh access to his machines? If he
    does, there is a wealth of protocols and tools for secure file transfer:
    scp, sftp, tar-over-ssh, cpio-over-ssh, rsync-over-ssh, ...

    With some loss of security, you may even be able to avoid handling
    passwords.

    /Jorgen

    --
    // Jorgen Grahn <jgrahn@ Ph'nglui mglw'nafh Cthulhu
    \X/ algonet.se> R'lyeh wgah'nagl fhtagn!
     
    Jorgen Grahn, Jul 19, 2005
    #8
  9. Re: Reg file uploading

    praba kar enlightened us with:
    > When we upload a file to the remote server we can get file type
    > through file extentions.


    No you can't, you can only make a better guess. If I name my PNG file
    somefile.jpg, you won't be able to get the file type through file
    extentions.

    > How we can find out file type if a file doesn't have any
    > extentions?


    One method is to look at the Content-type header the client sent along
    with the file. Another way is through the 'file' command.

    Sybren
    --
    The problem with the world is stupidity. Not saying there should be a
    capital punishment for stupidity, but why don't we just take the
    safety labels off of everything and let the problem solve itself?
    Frank Zappa
     
    Sybren Stuvel, Jul 20, 2005
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. A.M
    Replies:
    5
    Views:
    5,467
    Teemu Keiski
    Jun 8, 2004
  2. Daniel Malcolm
    Replies:
    0
    Views:
    566
    Daniel Malcolm
    Jan 24, 2005
  3. zdrakec
    Replies:
    1
    Views:
    443
    zdrakec
    Jul 25, 2005
  4. Dung Ping
    Replies:
    10
    Views:
    1,009
    Chaddy2222
    Jan 16, 2006
  5. david wolf
    Replies:
    6
    Views:
    606
    Babu Kalakrishnan
    Sep 25, 2006
Loading...

Share This Page