[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Fri, 3 Aug 2007 17:55:48 +0100
From: "Larry Bonner" <larry.bonner1@...il.com>
To: john-users@...ts.openwall.com
Subject: Re: incremental mode, estimation of computing time
you mean something like code attached?
where it tells you how many c/s and time left?
that would be cool to have in jtr, i agree, if thats what you mean of course!
/*
calcperm <minlen> <maxlen> <c/s> <charset length>
e.g
calcperm 1 7 1000000 26
Total permutations = 8353082582
000:02:139:13
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
void main(int argc, char *argv[])
{
int minLen,maxLen,charlen,i;
int keysPs;
double totalKeys=0.0;
int days,hours,minutes,seconds;
if(--argc == 4)
{
minLen = atoi(argv[1]);
maxLen = atoi(argv[2]);
keysPs = atoi(argv[3]);
charlen = atoi(argv[4]);
for(i=minLen;i<=maxLen;i++)
totalKeys += pow((double)charlen,(double)i);
printf("\nTotal permutations = %0.f",totalKeys);
seconds = totalKeys/keysPs;
minutes = seconds/60;
hours = minutes/60;
days = hours/24;
printf("\n%03d:%02d:%02d:%02d\n",days,hours,minutes,seconds%60);
}
}
--
To unsubscribe, e-mail john-users-unsubscribe@...ts.openwall.com and reply
to the automated confirmation request that will be sent to you.
Powered by blists - more mailing lists
Powered by Openwall GNU/*/Linux -
Powered by OpenVZ