Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back from 1 to 10+ pages to re-sync the thread and this will then show the latest posts. Thanks, Mike.
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

ZyXEL WEP keys

  • 03-03-2009 3:17pm
    #1
    Closed Accounts Posts: 1,567 ✭✭✭


    some months back, found some code that generates the WEP keys.

    most ZyXEL routers are shipped with WPA-PSK on by default so this is just posted for anyone who might be interested in how they're generated.thats all

    since around this time last year, the algorithms have changed.

    [PHP]char *genKey64(char *password, unsigned char *output)
    {
    size_t pass_len;
    unsigned char *p = output;
    unsigned int seed = 0;

    int i,j;

    if((pass_len = strlen(password)) != 0) {
    for(i = 0;i < pass_len;i++) {
    ((unsigned char*)&seed)[i % 4] ^= password;
    }
    }
    for(i = 0;i < 4;i++) {
    for(j = 0;j < 5;j++, p += 2) {
    seed = 214013 * seed + 2531011;
    sprintf(p,"%02x",(seed >> 16) & 0xff);
    }
    }

    return(output);
    }

    char *genKey128(char *input, unsigned char *output)
    {
    size_t pass_len;
    unsigned char wep_key[16]={0};
    char password[64];
    MD5_CTX ctx;

    int i;

    if((pass_len = strlen(input)) != 0) {

    for(i = 0;i < 64;i++)
    password = (input[i % pass_len]);
    }

    MD5Init(&ctx);
    MD5Update(&ctx,password,sizeof(password));
    MD5Final(wep_key,&ctx);

    for(i = 0;i < 13;i++)
    sprintf(&output[i*2],"%02x",wep_key);

    return(output);
    }[/PHP]


Advertisement