|
@@ -1,5 +1,5 @@
|
|
|
diff --git a/hello.cc b/hello.cc
|
|
diff --git a/hello.cc b/hello.cc
|
|
|
-index b1a095c..3222033 100644
|
|
|
|
|
|
|
+index b1a095c..4ac10d0 100644
|
|
|
--- a/hello.cc
|
|
--- a/hello.cc
|
|
|
+++ b/hello.cc
|
|
+++ b/hello.cc
|
|
|
@@ -1489,7 +1489,7 @@ operator << (std::basic_ostream<wchar_t> &os, WINBIO_REGISTERED_FORMAT r)
|
|
@@ -1489,7 +1489,7 @@ operator << (std::basic_ostream<wchar_t> &os, WINBIO_REGISTERED_FORMAT r)
|
|
@@ -11,20 +11,18 @@ index b1a095c..3222033 100644
|
|
|
identifyFeatureSet()
|
|
identifyFeatureSet()
|
|
|
{
|
|
{
|
|
|
//char ibuf[0x2000] = { 0 };
|
|
//char ibuf[0x2000] = { 0 };
|
|
|
-@@ -1507,9 +1507,19 @@ identifyFeatureSet()
|
|
|
|
|
|
|
+@@ -1507,9 +1507,17 @@ identifyFeatureSet()
|
|
|
for(LONG_PTR i=0;i<req.informationSize;i++)
|
|
for(LONG_PTR i=0;i<req.informationSize;i++)
|
|
|
printf("%02x", obuf[i]);
|
|
printf("%02x", obuf[i]);
|
|
|
printf("\n");
|
|
printf("\n");
|
|
|
+
|
|
+
|
|
|
-+ /* verify-only flow: did the enrolled record come back? */
|
|
|
|
|
-+ for(LONG_PTR i=0;i+7<=req.informationSize;i++) {
|
|
|
|
|
-+ if(memcmp(obuf+i, "Unicorn", 7) == 0) {
|
|
|
|
|
-+ printf("MATCH: enrolled record found\n");
|
|
|
|
|
-+ return 0;
|
|
|
|
|
-+ }
|
|
|
|
|
-+ }
|
|
|
|
|
-+ printf("NO MATCH\n");
|
|
|
|
|
-+ return 1;
|
|
|
|
|
|
|
++ /* A sensor match returns the stored identify record; a no-match result is
|
|
|
|
|
++ a zeroed structure (only a WinBio error dword further in is set).
|
|
|
|
|
++ Detect a record by its non-zero type/size header. */
|
|
|
|
|
++ int matched = req.informationSize >= 8 && (obuf[0] | obuf[1] | obuf[2] | obuf[3] |
|
|
|
|
|
++ obuf[4] | obuf[5] | obuf[6] | obuf[7]);
|
|
|
|
|
++ printf(matched ? "MATCH: identify record found\n" : "NO MATCH\n");
|
|
|
|
|
++ return matched ? 0 : 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void
|
|
-void
|
|
@@ -32,7 +30,7 @@ index b1a095c..3222033 100644
|
|
|
identify()
|
|
identify()
|
|
|
{
|
|
{
|
|
|
char ibuf[1024*10];
|
|
char ibuf[1024*10];
|
|
|
-@@ -1595,7 +1605,7 @@ identify()
|
|
|
|
|
|
|
+@@ -1595,7 +1603,7 @@ identify()
|
|
|
printf("sz=%lld\n", (PUCHAR)(hdr+1) - data->CaptureData.Data);
|
|
printf("sz=%lld\n", (PUCHAR)(hdr+1) - data->CaptureData.Data);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -41,7 +39,7 @@ index b1a095c..3222033 100644
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void
|
|
void
|
|
|
-@@ -1646,7 +1656,7 @@ reset()
|
|
|
|
|
|
|
+@@ -1646,7 +1654,7 @@ reset()
|
|
|
printf("\r\n");
|
|
printf("\r\n");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -50,7 +48,7 @@ index b1a095c..3222033 100644
|
|
|
enroll()
|
|
enroll()
|
|
|
{
|
|
{
|
|
|
Sleep(500);
|
|
Sleep(500);
|
|
|
-@@ -1749,6 +1759,8 @@ enroll()
|
|
|
|
|
|
|
+@@ -1749,6 +1757,8 @@ enroll()
|
|
|
Sleep(1000);
|
|
Sleep(1000);
|
|
|
|
|
|
|
|
commitEnrollment();
|
|
commitEnrollment();
|
|
@@ -59,7 +57,7 @@ index b1a095c..3222033 100644
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void
|
|
void
|
|
|
-@@ -2398,9 +2410,10 @@ struct breakpoint breakpoints[] = {
|
|
|
|
|
|
|
+@@ -2398,9 +2408,10 @@ struct breakpoint breakpoints[] = {
|
|
|
{ "00000001800D8C34", (unsigned char *)0x00000001800D8C34, handle_export_out },
|
|
{ "00000001800D8C34", (unsigned char *)0x00000001800D8C34, handle_export_out },
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -71,7 +69,7 @@ index b1a095c..3222033 100644
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void
|
|
void
|
|
|
-@@ -2414,10 +2427,9 @@ int
|
|
|
|
|
|
|
+@@ -2414,10 +2425,9 @@ int
|
|
|
main(int argc, char *argv[])
|
|
main(int argc, char *argv[])
|
|
|
{
|
|
{
|
|
|
char *br = getenv("SANDBOX_BREAKPOINTS");
|
|
char *br = getenv("SANDBOX_BREAKPOINTS");
|
|
@@ -83,7 +81,7 @@ index b1a095c..3222033 100644
|
|
|
if(argc != 2) {
|
|
if(argc != 2) {
|
|
|
usage();
|
|
usage();
|
|
|
return 3;
|
|
return 3;
|
|
|
-@@ -2436,7 +2448,6 @@ main(int argc, char *argv[])
|
|
|
|
|
|
|
+@@ -2436,7 +2446,6 @@ main(int argc, char *argv[])
|
|
|
usage();
|
|
usage();
|
|
|
return 3;
|
|
return 3;
|
|
|
}
|
|
}
|
|
@@ -91,7 +89,7 @@ index b1a095c..3222033 100644
|
|
|
|
|
|
|
|
HMODULE pDll = LoadLibrary("synawudfbiousb.dll");
|
|
HMODULE pDll = LoadLibrary("synawudfbiousb.dll");
|
|
|
if(!pDll) {
|
|
if(!pDll) {
|
|
|
-@@ -2542,16 +2553,26 @@ main(int argc, char *argv[])
|
|
|
|
|
|
|
+@@ -2542,16 +2551,26 @@ main(int argc, char *argv[])
|
|
|
|
|
|
|
|
setMode(2); // WINBIO_SENSOR_ADVANCED_MODE
|
|
setMode(2); // WINBIO_SENSOR_ADVANCED_MODE
|
|
|
|
|
|
|
@@ -106,13 +104,13 @@ index b1a095c..3222033 100644
|
|
|
+
|
|
+
|
|
|
+ if(what == enroll) {
|
|
+ if(what == enroll) {
|
|
|
+ enroll();
|
|
+ enroll();
|
|
|
-
|
|
|
|
|
-- identify();
|
|
|
|
|
|
|
++
|
|
|
+ printf("======================================================\r\n");
|
|
+ printf("======================================================\r\n");
|
|
|
+ printf("Sleeping 10 secons....\r\n");
|
|
+ printf("Sleeping 10 secons....\r\n");
|
|
|
+ printf("======================================================\r\n");
|
|
+ printf("======================================================\r\n");
|
|
|
+ Sleep(10000);
|
|
+ Sleep(10000);
|
|
|
-+
|
|
|
|
|
|
|
+
|
|
|
|
|
+- identify();
|
|
|
+ status = identify();
|
|
+ status = identify();
|
|
|
+ }
|
|
+ }
|
|
|
+ else if(what == identify) {
|
|
+ else if(what == identify) {
|