#include #include"servauth.h" long int now; int chal_len = 24; char fstimlen; char Stim[64] /* 0x2574c */; struct packedkey /* id 5 */ pk /* 0x2590c */; int main(int argc /*0x44*/, char **argv /*0x48*/) { FILE *db /* 0xffffff50 */; short int Randnum /* 0xffffff56 */; char response[20] /* 0xffffff58 */; char username[20] /* 0xffffff70 */; int done /* 0xffffff8c */; int statusval /* 0xffffff90 */; int i /* 0xffffff94 */; int column /* 0xffffff98 */; int flash /* 0xffffff9c */; char resp_buffer[80] /* 0xffffffa0 */; printf("Content-type: text/html"); strcpy(username, "testuser"); strcpy(response, "L5UU94"); Randnum = 1532; // 0x5fc //get_values(username, response, Randnum); strcpy(username, argv[1]); strcpy(response, argv[2]); Randnum = (short)atoi(argv[3]); if (db = fopen("test_log", "a")) { time(&now); fprintf(db, "%.24s user=%s resp=%s num=%d\n", ctime(&now), username, response, Randnum); fclose(db); } /*11204*/ fstimlen = (char)chal_len; GenerateChallengeBits(Randnum, Stim); if (LoadKeyInfo2(&pk, "keyfile2.txt", username) == -1) { printf("1"); printf("

username=%s
\nresponse=%s
\nRandnum=%d
\n", username, response, Randnum); exit(1); } /*112ac*/ if (VerifyResponse(&pk, Stim, response) == -1) { printf("2"); printf("

username=%s
\nresponse=%s
\nRandnum=%d
\n", username, response, Randnum); exit(0); } else { printf("0"); exit(1); } }