mirror of
https://github.com/winfsp/winfsp.git
synced 2025-06-15 08:12:45 -05:00
tst: secret: small program to aid with testing launcher secrets
This commit is contained in:
32
tst/secret/secret.c
Normal file
32
tst/secret/secret.c
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Compile:
|
||||||
|
* - cl secret.c
|
||||||
|
*
|
||||||
|
* Register:
|
||||||
|
* - secret.reg (fix Executable path first)
|
||||||
|
*
|
||||||
|
* Run:
|
||||||
|
* - launchctl-x64 startWithSecret secret 1 nopass
|
||||||
|
* - launchctl-x64 startWithSecret secret 1 foobar
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
char pass[256];
|
||||||
|
|
||||||
|
gets(pass);
|
||||||
|
if (0 == strcmp("foobar", pass))
|
||||||
|
{
|
||||||
|
puts("OK");
|
||||||
|
fprintf(stderr, "OK secret=\"%s\"\n", pass);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
puts("KO");
|
||||||
|
fprintf(stderr, "KO secret=\"%s\"\n", pass);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
BIN
tst/secret/secret.reg
Normal file
BIN
tst/secret/secret.reg
Normal file
Binary file not shown.
Reference in New Issue
Block a user