Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 27th, 2003, 05:45 PM
Arkamir Arkamir is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 36 Arkamir User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
web forms encryption

Hey can anyone explain to me how to encrypt the info sent in forms, such as a create username one and how to decrypt it.

p.s. I did see the encrytion thread below this one

Reply With Quote
  #2  
Old October 27th, 2003, 06:40 PM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,536 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 18 h 3 m 4 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
Hi,

For this type of encryption you'd probably find the built-in rotor module interesting - which is allot like the crypt function in PHP (, *nix?) etc. there's also the crypt module but it's only available on *nix

http://www.python.org/doc/current/lib/module-rotor.html
http://www.python.org/doc/current/lib/module-crypt.html

however since this was depreciated in Python 2.3.. your best bet is probably the python cryptography toolkit (pycrypto). I did a quick search on google for 'Python crypty()', this looks pretty interesting!

http://www.sabren.net/code/python/crypt/

As for encrpyting form data you need to get access to the data in the form (generally using cgi.FieldStorage()) and then encrypt that data, you can then do whatever you want to it i.e. store it in a db

http://www.devshed.com/Server_Side/.../CGI/page1.html
http://www.devshed.com/Server_Side/...ySQL/page1.html

Could you explain what you mean by create username? that one has me at a loss

Mark.
__________________
programming language development: www.netytan.com Hula


Reply With Quote
  #3  
Old October 28th, 2003, 05:31 AM
telex4's Avatar
telex4 telex4 is offline
Wacky hack
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2001
Location: London, England
Posts: 512 telex4 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 25 m 29 sec
Reputation Power: 8
Also, if you want to have the data being sent between the user and the web site encrypted, you'll need to look into using SSL. That's to do with your web server, so contact your host about it.

Reply With Quote
  #4  
Old October 28th, 2003, 06:58 PM
Arkamir Arkamir is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 36 Arkamir User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
oops sorry for confusing you. I need to create a create username name thingy for the message board im making, and this was probably a bad place to post this since it has to do with the html and encryption from the user to the server.

Reply With Quote
  #5  
Old October 29th, 2003, 02:33 AM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,536 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 18 h 3 m 4 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
So you want to randomly generate a username and password instread of letting the user pick there own? If so, it's not hard to do , especially with Python 2.3! All you have to do is call random.sample() on a string (possiably from a file), you dol need to check if the username exists first though.. can't really help with the server thing though obviously . How is your board coming anyway?

Mark.

Reply With Quote
  #6  
Old November 2nd, 2003, 02:04 PM
Arkamir Arkamir is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 36 Arkamir User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
no

they need to enter there own but i need to encrypt its transfer from the page to the server

Reply With Quote
  #7  
Old November 2nd, 2003, 02:16 PM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,536 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 18 h 3 m 4 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
Telex is right, it sounds like you want SSL to me .. in any case i think this is more of a server thing than a Python question.

I don't see how it's too much of a problem though Ark.. as far as i'm aware this forum just sends data from the browser to the webserver (no encryption). So not something i'd really worry about too much ayway!

Mark.

Reply With Quote
  #8  
Old November 2nd, 2003, 03:12 PM
telex4's Avatar
telex4 telex4 is offline
Wacky hack
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2001
Location: London, England
Posts: 512 telex4 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 25 m 29 sec
Reputation Power: 8
As netyan says, SSL isn't necessary, though if you can make it work and you really want your data to be secure when being transmitted, it's probably a good thing to use. Look through the documentation for your web server, contact your host, and work out SSL.

Otherwise, simply encrypting passwords with the MD5 algorithm is going to make the passwords very secure, and applying some simple obsfucation with regular expressions or using crypt will deter the less determined crackers.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > web forms encryption


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT