![]() |
| ||
| Newbie Needs Help Hi all, I'm fairly new to Perl I am confused ? I will try to explain it. What i am trying to do is we have 26 branches and our central office generates data files like for income files (003.inc010105,003.inc020105,) /sales(003.sal010105) and many more reports on dialy basis in text format which is 08 kb to 15 kb. I mean to say when 003 logs in and wants income files all files pretaning to his branch 003+inc(income file)+date(s) will be availabe to him for download or view which is stored in a particular folder, and in the same order for sales or other reports. And in same manner for other branches 004,005 or others. Using a perl script for login. We are sending sensitive/secret information via https. May some one please show me some way. Thanks in advance |
| ||
| Re: Newbie Needs Help I'll be honest, I only vaguely understand what you need done. I can assist you in building a perl program that logs someone in, etc, etc, but I'm a little lost on your whole file structure with dates and stuff. I don't have enough information to help you with your problem, but if you could elaborate, I'd be glad to see what I can do. |
| ||
| Re: Newbie Needs Help Hi Comatose, Thanks for your speedy reply. I have text files something like this 003inc010205.txt / 003inc020205.txt (here 003 means branch code + (inc) file name + date) These files are generated on daily basis only the last part of date is changed. And similarly for sales we have 003sal010205.txt and in the same fashion for other reports (branch code + file name + date) The starting of the file denotes the code of branch 003 is xxx branch / 004 is yyy branch / 005 is zzz branch and so on. Now when 003 logs in with a login Id as 003 and wants inc files all the files pertaining to 003inc+dates will be available to him for download. And in the same manner for other reports. When 004 logs in and wants his inc files all files for 004inc+dates will be available for him. These files are located in particular directory sub-folder. It’s like finding files in directory sub-folder. ?branch code=xxxfilename&directory=AAA. I apologise if I'm asking a lot but I can't see how to do this? Your help is greatly appreciated! Thanks! |
| ||
| Re: Newbie Needs Help Ok, I understand the file naming convention, but now I need to know a few number of things. A) This will be all web-based right? B) A list of all the possible filenames (inc, sal, etc, etc) C) A List of the directory structure (/ourfiles/001/sal) or whatever D) Is There A Username and Password Needed, If So, Where Will the password file be stored? Is It A Unix Encrypted Password? Is It using PAM? Will it be just a plain text password file? |
| ||
| Re: Newbie Needs Help Hi, Answers to your previous reply. A)Its a dial-up server. B)Yes C)Yes D)Yes, a username & password is a must because the username will be set to numeric like 003,004 or 005.... The password file is in /cgi-bin/pswd/password.txt Its just a plain text password file. |
| ||
| Re: Newbie Needs Help Ok, What do you mean dial-up server? I'm saying this perl program is supposed to be a CGI (all web based) right? B and C are not yes and no questions. I'm saying that I will need a list of all possible names: inc, sal, and whatever else there is.... I'll also need the directory tree where all these .txt files are stored at. The Password File, How is it delimited: username:password, by comma's or by tabs? You say plain text, so I'm guessing the password is NOT encrypted also.... having it stored in the CGI bin, is generally a bad idea. If you plan to do that, a good idea is to rename it to password.pl, so that the server thinks it's a program, and if someone tries to surf to it, they will get an error message. Also, Are you saying that the username is assigned which branch based on their name? If so, is this in the password file? Say: branch:username:password? |
| ||
| Re: Newbie Needs Help Hi, This perl program is definitely to be a CGI (all web based) Yes. B) list of all possible names: inc, sal, inw, out, drecs, crecs, drtrf, crtrf, drnat, crnat. C) Individual folder for inc, sal, inw... in /var/www/bank/reports) The password file is delimited by tabs and password is NOT encrypted. I will surely work on your advice and rename it as password.pl thanks for your kind advice to me. No only username&password is there. |
| ||
| Re: Newbie Needs Help Ok, Now, Each One of those has a folder under /var/www/bank/reports, so /var/www/bank/reports/inc/*.* is all the inc files. So, all the inc files are clumped together (003incdate, 004incdate, 005incdate) in the same folder right? So far so good, we need to find a way now, however, to be able to store the branch with the username, or find a way to associate the two of them. Is The password file already made and already setup? Would it hurt to modify that password file? Otherwise, we can create another file (say branch.txt.pl) that will link the two together. Say, line one of the password file is: jsmith <TAB> Password then in the branch.txt.pl file, make line 1 003 (or whatever branch jsmith is). Do you understand so far? |
| ||
| Re: Newbie Needs Help Hi, Yes, all the inc files are clumped together (003incdate, 004incdate, 005incdate) in the same folder. /var/www/bank/reports/inc/*.* The password file is only made, no setup is done. We can modify the password file. |
| ||
| Re: Newbie Needs Help Too Cool. The password file will need minor modification, so that we can associate everyone by their branch. So, I'm thinking that 1 line of the password file should look like this: username <TAB> password <TAB> branch number IE: jsmith mykidsname 003 I'll assume that the password file will look like this (and will build one for testing purpose on my server), and I'll start building some code for it. I'm only going to do very plain HTML within the Perl Script, but I'll comment it all, and make it very easy to know where you will need to modify in order to make it look .... well, like the rest of the site :) I'll start working on that tonight. |
| All times are GMT -4. The time now is 4:06 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC