|
|
|
|
![]() ![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members
Posts: 205 Joined: 6-October 09 From: somewhere where arent others Member No.: 89,308 myCENT:60.93 |
Post
#21
Nov 7 2009, 10:28 PM
This kind of files are really good way to store lots of data,but if they are not important.Because if you store passwords in files,hackers will find out the file and only a half step is separating them from hacking your website or stealing someones password.The half step is decrypting which is possible if you only use md5 to encrypt passwords.You should always use more complicated way to encrypt passwords if you use flat files.Flat files for example are very good for logs.I have a little script which is storing everyone's IP and time he visited my website,and all that data is stored in one file which i can see.If you use flat files for passwords i cannot give you the principe i use this principe to encrypt passwords: CODE function enc($string){ $second=sha1($string); $third=str_replace("a","z",$second); return md5($third); } So this code first encrypts string in sha1,then it replaces a with z,to make hash not decryptable,then it is encrypting the sha1 hash with md5 method.So this will always return the same result,and that is why this function will work...If you do not believe me,try to add this code in php page and refresh and you will always see the same vode.So you need to use this to check is the password correct: if(enc(the password user specified)==enc(the password which should be){ the code should be executed } Remember that you need to replace bold things with real variables or code.Flat files are better if you need to do some operation fast,without any complicate code and without errors.Remember,FLAT FILES SHOULD NOT BE USED FOR THINGS LIKE PASSWORDS IF THEY ARE NOT SECURED |
![]() ![]() |
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
36 | gamefreaksl | 45,335 | 2nd November 2009 - 04:43 AM Last post by: user681 |
|||
![]() |
38 | Roly | 58,250 | 4th November 2009 - 03:03 PM Last post by: TheDarkHacker |
|||
![]() |
17 | takato2100 | 2,611 | 20th November 2009 - 02:25 PM Last post by: mahesh2k |
|||
![]() |
4 | zip_mc | 13,321 | 22nd September 2009 - 10:26 AM Last post by: akira550 |
|||
![]() |
3 | tomko | 8,766 | 6th August 2004 - 11:55 AM Last post by: triax |
|||
![]() |
56 | LILJOHN | 56,804 | 5th December 2008 - 04:51 PM Last post by: buxgoddess |
|||
![]() |
0 | slacker | 3,457 | 9th August 2004 - 05:53 AM Last post by: slacker |
|||
![]() |
4 | LuciferStar | 7,642 | 19th August 2004 - 01:39 AM Last post by: LuciferStar |
|||
![]() |
19 | odomike | 16,963 | 11th December 2004 - 05:30 PM Last post by: antitrust |
|||
![]() |
21 | djleli | 18,550 | 18th November 2009 - 12:21 PM Last post by: legend112 |
|||
![]() |
19 | Raptrex | 13,691 | 3rd September 2004 - 10:33 AM Last post by: wassie |
|||
![]() |
5 | Vacant | 5,652 | 3rd December 2008 - 02:43 AM Last post by: wingman23 |
|||
![]() |
72 | holyium | 43,173 | 31st May 2009 - 10:02 PM Last post by: nol |
|||
![]() |
26 | -prodigy- | 21,981 | 19th April 2008 - 08:19 AM Last post by: HyBriD54 |
|||
![]() |
2 | Jpacker | 4,090 | 27th August 2004 - 03:02 PM Last post by: OpaQue |
|||
|
Open Discussion | Time is now: 22nd November 2009 - 04:18 AM |
Web Hosting Powered by ComputingHost.com.