update
This commit is contained in:
@@ -55,16 +55,26 @@ int main(int argc, char** argv){
|
||||
text[len - 1] = 0;
|
||||
}
|
||||
int index = 0;
|
||||
char uid[400];
|
||||
while (text[index]){
|
||||
if (text[index] == 'U'){
|
||||
if (strncmp(text + index, "UID=", 4)){
|
||||
if (strncmp(text + index, "UID=", 4) == 0){
|
||||
printf("pattern found\n");
|
||||
index += 4;
|
||||
int j = 0 ;
|
||||
while(text[index] && text[index] != ';' && text[index] != '\r' && text[index] != '\n'){
|
||||
uid[j] = text[index];
|
||||
j++;
|
||||
index++;
|
||||
}
|
||||
uid[j + 1] = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
index++;
|
||||
|
||||
}
|
||||
printf("uid=%s\n", uid);
|
||||
fclose(fichier_out);
|
||||
free(file_buffer);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user