drallieiv / KinanCity

Yet another PTC account generator
Apache License 2.0
125 stars 66 forks source link

Added: Random Passwords #48

Open 123FLO321 opened 7 years ago

123FLO321 commented 7 years ago

added random passwords if no password is specified (for Sequence and Single) added "pl" flag to specify length of random passwords (defaults: random)

123FLO321 commented 7 years ago

How about not adding a now flag but adding these formats to the default password flag. Maybe: "Pa\xswordxxx" xxx gets replaced and \x stays as x

Chars would only be replaced if the char is inside the char pool. The char pool is empty be default but can be replaced inside the config file (or remove a # if you just use the preset one.

So by defaults Passwordxxx stays Passwordxxx

Config file default:

pwPool.A = A,B,C,D,...

pwPool.a = a,b,c,d,...

pwPool0 = 0,1,2,3,..

pwPool.+ = (,),&,%,...

pwPool.x = all

There you could also add custom ones like this: pwPool.i = Hello, World, ...

neskk commented 7 years ago

@123FLO321 any chance you can finish the alterations requested by drallieiv? Having the ability to set a pattern for password generation is completely optional for me but it's a nice feature. Not having to type a new random password for every set of accounts I am about to create is a great idea. I would take this a step further and define the "template"/string substitution engine and let it be used both in Password and Username fields. The country code should also be able to be specified in a command line argument for flexibility. Random complaint to @drallieiv: for some reason not checking if nickname is available before requesting a Captcha is non-sense to me. To create ~1800 accounts 2 captcha reported around 2600 captchas submitted. As I pointed out in Discord the other day, 30% waste on captchas is expensive and all because Kinan doesn't want to make a simple HTTP request to check if username is available for each account being created causing captchas to be requested and going to waste. I can't believe that the number of username checks an IP can make if inferior to the number of accounts that can be registered and because of this there's no reason that for every account created a username check is made to make sure we don't waste a captcha. I haven't had time to test stuff, been busy with my exams, maybe today I take a look into the code. Good work @123FLO321 👍

123FLO321 commented 7 years ago

@neskk Yes, I'll continue working on this soon. And I guess also implementing it into the username.

drallieiv commented 7 years ago

It would definately be easier to have 2 distinct parameters for fixed password and random password. current fixed password would become fixed-password, fp and adding random-password, rpfor the new password format.

As for using "pwPool.i" properties file reading can only be done if the key is known

drallieiv commented 7 years ago

@neskk I already explained myself on DM, username check is already implemented on the API but was removed from the process. If you want to put it back, create a separate pull request using it, and prove me wrong.

123FLO321 commented 7 years ago

@drallieiv I don't see any reason to have 2 separate password parameters since random pw/username would be disabled by default. So: -pr (password-random) and/or -ur (username-random) would enable that feature.

neskk commented 7 years ago

@123FLO321 I think @drallieiv was thinking when you want to distinguish "pure random" from "pattern random" My opinion is this: --random-password would not accept any parameter and just be a pure random password based on a fixed pattern (maybe variable length, rolling pattern, etc). --password would accept a pattern or, here's the tricky part, a fixed password. Problem comes when you want to distinguish fixed password/username from pattern one, i.e. how do you know if '123abc+' is meant to be a fixed password or random like '123abc%', '123abc!', etc.? Maybe we actually need an extra flag to disable pattern substitution so we could input a "fixed" password with symbols that are placeholders in pattern mode.

123FLO321 commented 7 years ago

@neskk "-pw Password+" would not be replaced by default. only if --random-password is added. And even then it only gets replaced if "+" is in the set. If you want a "+" you can type "+".

neskk commented 7 years ago

@123FLO321 ah ok I think I understood now... what you mean is that these three options exist, right?

  1. -pw format + -random-pass - random password with pattern
  2. -pw literal - fixed password
  3. -random-pass - pure random password

I think it would be cool if username could use the same logic as password to generate random usernames.

123FLO321 commented 7 years ago

@neskk No only 2 (+pool) new ones: enable random password and enable random username.

tomballgithub commented 7 years ago

Agree with @neskk that random usernames are needed also to avoid Niantic detection from looking for patterns in future. Currently I am creating random usernames/passwords in excel and importing them into KinanCity.

drallieiv commented 3 years ago

If anyone wants to work on that, let me know