From daa23002c2751ed60c915d7fa5bcd33a7ff03648 Mon Sep 17 00:00:00 2001 From: Jake Visser Date: Wed, 5 Jul 2017 23:41:04 -0700 Subject: [PATCH] extract badgeid --- qcbadge/Controllers/HomeController.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/qcbadge/Controllers/HomeController.cs b/qcbadge/Controllers/HomeController.cs index 6ce82d0..1d0757b 100644 --- a/qcbadge/Controllers/HomeController.cs +++ b/qcbadge/Controllers/HomeController.cs @@ -138,6 +138,7 @@ namespace qcbadge.Controllers // 0908[0000000000000000] < -End + Crypto // // 0x0201040319DC190FFFD304AAAABBCCDDDDDDDDDDEE09080000000000000000 + // 0x0201040319DC190FFFD3040122BBCCDDDDDDDDDDEE09080000000000000000 = Badgeid = 122/290 if (String.IsNullOrEmpty(advertData)) { @@ -152,7 +153,25 @@ namespace qcbadge.Controllers if(advertData.StartsWith(header) && advertData.EndsWith(footer)) { + System.Diagnostics.Debug.WriteLine("*************************************"); + System.Diagnostics.Debug.WriteLine("*************************************"); + System.Diagnostics.Debug.WriteLine("*************************************"); + System.Diagnostics.Debug.WriteLine("*************************************"); + System.Diagnostics.Debug.WriteLine("*************************************"); + System.Diagnostics.Debug.WriteLine("*************************************"); + System.Diagnostics.Debug.WriteLine("*************************************"); + System.Diagnostics.Debug.WriteLine("*************************************"); + System.Diagnostics.Debug.WriteLine("*************************************"); + System.Diagnostics.Debug.WriteLine("*************************************"); + String qcData = advertData.Substring(24, 20); + System.Diagnostics.Debug.WriteLine(qcData); + + int badgeId = Convert.ToInt32(qcData.Substring(0, 3), 16); + System.Diagnostics.Debug.WriteLine(badgeId); + + return StatusCode(200); + } else {