Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Random personal names

by ambrus (Abbot)
on Apr 10, 2011 at 10:52 UTC ( [id://898592]=note: print w/replies, xml ) Need Help??


in reply to Random personal names

This kind of code is only useful for would-be spammers who want to generate random mail. Even if you intend your undetectable keylogger virus as just an "educational toy", posting it will actually help black hat people who can easily reuse it for malicious purposes. Please try to be more responsible in what you post here.

Replies are listed 'Best First'.
Re^2: Random personal names
by GrandFather (Saint) on Apr 10, 2011 at 11:54 UTC

    Actually gamers and authors are sometimes interested in such code, although less often involving Hungarian names!

    True laziness is hard work

      I use things like this quite a lot, but I'm not allowed to publish the code. The project I use it for involves "anonymizing" databases, so I can create reproducible customer situations.

      In that process, I first collect all surnames and given names from several databases, split them on whitespace grouped by gender. Then I shuffle the list of names and create new names from the existing list by randomly picking 2 to 5 names from the correct gender list and put them in a random order and assign the new name to the anonymized victim.

      The problem that is faced here, is that I have to go through all related databases too, to change the name of the parents and children so the the relations still match.

      I do the same for date of birth and place of birth. And for ZIP codes.

      The best part however is the addresses. First I collect all the street names from all the databases I have access to, then I split the street names on known extensions: "street", "alley", "boulevard", "road", "way", "path", etc etc. Then I take the first part of those, shuffle them and generate new street names based on the prefix + any of the known extensions. "Bondstreet" thus creates "Bondstreet", "Bondalley", "Bondroad", etc etc. I then shuffle the new list and replace all the original street names with a random pick from the new list.

      Together with some other changes, someone with knowledge of the original database said he was unable to "see" what persons were involved in the new data set. This way we can mimic problems at any size of customer database, as we now generate a new one from an existing one with the same size and relations and the "anonymize" the complete set.

      This has proven to be a very useful approach. All done in perl of course and nothing to do with spam or hackers.


      Enjoy, Have FUN! H.Merijn
Re^2: Random personal names
by zwon (Abbot) on Apr 10, 2011 at 14:17 UTC

    I used similar code for stress testing of multiuser web-based application. And as we also were in need to demonstrate reporting system to management, and user_0001, user_0002 etc in Full Name column didn't look especially impressive, so I used Data::RandomPerson (BTW, why don't you submit your addition ;) to generate a lot of users with nice names.

Re^2: Random personal names
by CountZero (Bishop) on Apr 10, 2011 at 22:49 UTC
    Then perhaps Perl, our beloved language, should be put on the black list as well?

    Or even better, perhaps restrict access to computers all together to people who have a proven track-record of playing "nice" (for whatever definition of "nice" you or any dictatorship might fancy).

    Please try to be more responsible in what you post here
    Why are you saying that to yourself?

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://898592]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-23 07:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found