Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

need to auto generate user/password info

by perl-less (Novice)
on Jun 19, 2004 at 20:56 UTC ( #368205=perlquestion: print w/replies, xml ) Need Help??

perl-less has asked for the wisdom of the Perl Monks concerning the following question:

First, I have virtually no knowledge of Perl. I'm working with some Perl script downloaded from PayPal, which is my client's choice for receiving payments on the web site I'm developing for her. She sells an online business course, and buyers are purchasing access to password protected web pages. Would someone take a look at the script I've got? I want it to automatically create a username and password for each buyer upon purchase AND to automatically email this username/password info to the buyer. My Perl script can be seen at this url: http://www.empoweringvision.com/site/perl.html I think some additional code is needed in order to enable the 2 automated functions I described. Any specific code you can suggest would be well nigh life-saving. Thank so kindly...
  • Comment on need to auto generate user/password info

Replies are listed 'Best First'.
Re: need to auto generate user/password info
by Errto (Vicar) on Jun 20, 2004 at 00:28 UTC
    Though I agree with arden, I don't think it will cause any harm to give you a hint to start off with. This node on Perlmonks suggests the use of the Crypt::GeneratePassword module available from CPAN. Once you've learned some Perl, I think you'll find it easy to incorporate in your code. As for learning Perl itself, you should get a book, but meanwhile the Tutorials may be a good place to start.
      I just call passwdgen to generate my passwords. It may not be as portable but it does offer a ton of flexibility.
      sub generatePassword { my $password = `passwdgen -pa --length=6`; $password =~ s/Your password is: (.*)/$1/; chomp $password; return $password; }

        Of course you could also use something like Crypt::PassGen (Crypt::PassGen - Generate a random password that looks like a real word). The generated passwords aren't perfect, but it usually suits me for non-critical things and the generated passwords are usually quite easy to remember, for the look like real words.

        --
        b10m

        All code is usually tested, but rarely trusted.
Re: need to auto generate user/password info
by arden (Curate) on Jun 19, 2004 at 21:21 UTC
    perl-less, what you are asking us to do is to provide you, free of charge, with code that you are going to get paid for. The monastery is here to help people with Perl, not to do people's work for them. This is worse than students asking us to do their homework for them, you're actually being paid to do something which you claim you have no knowledge of how to do. How much more dis-honest can you get?

    Does your "client" know that you don't know Perl? Have you never taken an ethics course before? There are plenty of people here in the monastery who are actually paid for developing Perl applications and/or consulting in situations like the one you describe, although I am not one of them.

    If you want help with this, I suggest that you 1) offer a fee to be paid for the service, since you are getting paid for the project, and 2) specify very clearly what your requirements are. What O/S is this server on? What version(s) of Perl are available on it? Do you have full freedom on this machine or is it leased and subject to restrictions by the ISP? And then, what exactly do you wish to do?

    I hope you find someone to help you and I hope you pay them well for their service. I, however, will not help you to create something which you are going to claim authorship of and collect compensation for.

    - - arden.

    update: I was referring to being dis-honest with his client, long before it was stated that "she is a friend." I'm also somewhat upset by the lack of effort shown by the poster: what has he tried, what kind of errors was he given? I know that many (maybe most?) of the folks here get paid one way or another for their development work. I do not expect the site to be used only by people for non-commercial endeavours, but I do expect some effort to be expended first by those asking for aide and I try to promote honesty in business (and education) by not claiming ownership of something you cannot or did not create.

      While my use of Perl is entirely personal and has nothing to do with my job, I suspect that a great number of monks here make a living directly or indirectly using or writing perl.

      I've been a member of PerlMonks since March of 2000 and I did not realize that this site was only for the use of non-professionals and those working for free. I always thought it was a place for perl professionals and non-professionals as well as hobbiests and enthusiasts to interact, learn from and educate each other.

      Granted, the tone of his post strikes me as a bit grating, but it isn't because he's getting paid for work that he is coming to us for help with. What puts me off is the impression his post gives that he is presenting himself to one or more clients as posessing skills which he freely admits (to us) that he does not have and is asking us to do the work for him. If he had made clear in his original post that he was helping a friend with a site and was stumped because he is unfamiliar with perl, that would not be so bad.

      I suspect that you agree with these comments and that you are only taking issue with the same things I have indicated. I don't care why someone is asking for help - be it to assist with their day-job work, a school-project or their side-project, as long as they are doing so in a fair way which doesn't make those of us who help them feel like we're being sodomized by some ungrateful leech in the process.

      If, on the other hand, you really think that this site should be (or even is) only used by people for altruistic, free, non-commercial, RMS-style causes - half of us should probably pack up our things.

      Otherwise, I do concur with the general tone of your post. Well worded and appropriate.
      How much more dis-honest can you get?
      perl-less is not being dishonest, just inappropriate. Dishonest would have been deliberately obscuring or omitting the context of his request, or lying about the situation outright.
      I am so terribly sorry for my ignorance and insult to the Monastery. My client is a friend who is paying me very little as she has no budget to hire a professional. Nonetheless, I see that I was quite out of line to make the request that I did. If you wish to remove my post, I think that's best. And I will look to hire a consultant. Please do accept my apology.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://368205]
Approved by EdwardG
Front-paged by Ao
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2021-12-01 15:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (13 votes). Check out past polls.

    Notices?