[gitlog] [eggheads/eggdrop] 103128: Enhance makepass() and make_rand_str()

Michael Ortmann noreply at github.com
Wed Jun 26 00:53:55 UTC 2019


  Branch: refs/heads/develop
  Home:   https://github.com/eggheads/eggdrop
  Commit: 103128c93f31bb09bb0a8149cc1dac51f5625858
      https://github.com/eggheads/eggdrop/commit/103128c93f31bb09bb0a8149cc1dac51f5625858
  Author: Michael Ortmann <41313082+michaelortmann at users.noreply.github.com>
  Date:   2019-06-25 (Tue, 25 Jun 2019)

  Changed paths:
    M src/dcc.c
    M src/dccutil.c
    M src/eggdrop.h
    M src/misc.c
    M src/mod/share.mod/share.c

  Log Message:
  -----------
  Enhance makepass() and make_rand_str()

Found by: michaelortmann
Patch by: michaelortmann


    misc.c: Rewrote make_rand_str() to be more random and faster. Entropy was worse because of randint(3) toggle beween lower case letters and digits.
    dccutil.c: Rewrote makepass() to be more random and faster. It returned passwords of len 10 to 15. Now it will always return passwords of len 15. There is no documentation about the maximum password length returned, but this function is exported, so i want to leave it 15 for eggdrop 1.8.
    dcc.c: ps[20] -> pass[16] because now we know the max length returned from makepass(). While at it, equally renamed the array to pass.
    share.c: p[32] -> pass[16] because now we know the max length returned from makepass(). While at it, equally renamed the array to pass. The code was really fooling the reader to think a share password of len 31 would be calculated.




More information about the Changes mailing list