Check if stdout is a terminal, if so, print a verbose message.
This commit is contained in:
parent
c924689690
commit
9c2ac77594
1 changed files with 16 additions and 5 deletions
|
|
@ -72,11 +72,22 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
printf("%d ", bits);
|
if(isatty(1))
|
||||||
for(i = 0; i < bytes; i++)
|
{
|
||||||
printf("%02x", p[i]);
|
fprintf(stderr, ": done.\nThe following line should be ENTIRELY copied into a passphrase file:\n");
|
||||||
puts("");
|
printf("%d ", bits);
|
||||||
fprintf(stderr, ": done.\n");
|
for(i = 0; i < bytes; i++)
|
||||||
|
printf("%02x", p[i]);
|
||||||
|
puts("");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf("%d ", bits);
|
||||||
|
for(i = 0; i < bytes; i++)
|
||||||
|
printf("%02x", p[i]);
|
||||||
|
puts("");
|
||||||
|
fprintf(stderr, ": done.\n");
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue