Validate an #IAP Receipt from #Apple

March 22, 2017 Leave a comment

receipt

If you accept In app purchases in your app, and particularly subscription payments, then you might need to know if a user cancels their subscription, so you can close their account. To do this, you need to store the receipt returned by storekit, and periodically check it for validity.

Here is a tool to do so: http://iapreceipt.apixml.net/ – it’s written in C# and here’s the code below;

private string Verify(string receipt, string serviceUrl, string sharedSecret)
{
var json = string.Format(“{{\”receipt-data\”:\”{0}\”,\”password\”:\”{1}\”}}”, receipt, sharedSecret);
var wr = WebRequest.Create(serviceUrl);
wr.ContentType = “text/plain”;
wr.Method = “POST”;
var sw = new System.IO.StreamWriter(wr.GetRequestStream());
sw.Write(json);
sw.Flush();
sw.Close();
var wresp = wr.GetResponse();
if (wresp != null)
{
var sr = new System.IO.StreamReader(wresp.GetResponseStream());
var response = sr.ReadToEnd();
sr.Close();
return response;
}
return “no-data”;
}

Categories: Uncategorized

Anatomy of an #IAP Receipt

March 21, 2017 1 comment

logo-storekit

After a In app purchase is made, then you get a digital receipt from Apple if you call storekit.loadReceipts – Which is effectively a double-encoded Base 64 string, When you encode once you get this:

{
“signature” = “… data …”;
“purchase-info” = “… data …”;
“environment” = “Sandbox”;
“pod” = “100”;
“signing-status” = “0”;
}

Where Signature and purchase-info are base64 encoded. Signature is effectively binary data, but you can make out some text that belies its contents

Apple Inc. Apple Worldwide Developer Relations

Apple Worldwide Developer Relations Certification Authority

Mac App Store and iTunes Store Receipt Signing,

Apple Worldwide Developer Relations

Apple Inc

http://ocsp.apple.com/ocsp03-wwdr

Reliance on this certificate by any party assumes acceptance of the then applicable standard terms and conditions of use, certificate policy and certification practice statements.

http://www.apple.com/certificateauthority

The purchase-info field is more JSON, which is more useful.

{
“original-purchase-date-pst” = “2017-03-21 13:25:40 America/Los_Angeles”;
“purchase-date-ms” = “1490127939469”;
“unique-identifier” = “d2c92e2ce1f259f623d66e6df364b4ed6da1b2cd”;
“original-transaction-id” = “1000000283718133”;
“expires-date” = “1490128239469”;
“transaction-id” = “1000000283718133”;
“original-purchase-date-ms” = “1490127940017”;
“web-order-line-item-id” = “1000000034637027”;
“bvrs” = “1.2.0”;
“unique-vendor-identifier” = “06FFEBC2-47F3-4848-AFB2-A45211674A81”;
“expires-date-formatted-pst” = “2017-03-21 13:30:39 America/Los_Angeles”;
“item-id” = “1215609502”;
“expires-date-formatted” = “2017-03-21 20:30:39 Etc/GMT”;
“product-id” = “CloudAnsweringMachineSubscription”;
“purchase-date” = “2017-03-21 20:25:39 Etc/GMT”;
“original-purchase-date” = “2017-03-21 20:25:40 Etc/GMT”;
“bid” = “ie.infiniteloop.cloudansweringmachine”;
“purchase-date-pst” = “2017-03-21 13:25:39 America/Los_Angeles”;
“quantity” = “1”;
}

Categories: Uncategorized

Virtual #Answering Machine app for #iOS and #Android

March 20, 2017 Leave a comment

175x175bb

Quick Links:

https://itunes.apple.com/us/app/cloud-answering-machine/id1214710746?mt=8&at=1000l9tW

https://play.google.com/store/apps/details?id=ie.infiniteloop.cloudansweringmachine

What is it?

Get a second phone number anywhere in the world, that you can use to take messages on your behalf, and accept SMS texts – Great if you keep getting interrupted during work with unimportant calls.

What’s the catch?

It’s $15 / €12 / £10 per month to buy a number, you can pay via the website www.cloudansweringmachine.com – or  via in-app-purchase on the iOS app.

How does it work?

You select a country, a phone number, then pay the fee. Within 24 hours you get a second phone number.

 

 

 

Categories: Uncategorized

Get a detailed #Network #Trace without #Wireshark

March 14, 2017 Leave a comment

logo_wireshark

Wireshark is a great tool for seeing all the network traffic on your machine – or in promiscuous mode, traffic within your network – however, sometimes all you are inspecting is the traffic generated from your own application.

Let’s take a really simple code example:

WebClient wc = new WebClient();
var strHtml = wc.DownloadString(“https://icanhazip.com/”);

You’d just expect a simple exchange of data between you and icanhazip.com?, nope – it’s really complex, and lets see how to see how deep that rabbit hole goes !;

First, add this XML to your app.config / web.config:

<system.diagnostics>
<trace autoflush=”true” />
<sources>
<source name=”System.Net”>
<listeners>
<add name=”System.Net”/>
</listeners>
</source>
<source name=”System.Net.HttpListener”>
<listeners>
<add name=”System.Net”/>
</listeners>
</source>
<source name=”System.Net.Sockets”>
<listeners>
<add name=”System.Net”/>
</listeners>
</source>
<source name=”System.Net.Cache”>
<listeners>
<add name=”System.Net”/>
</listeners>
</source>
</sources>
<sharedListeners>
<add
name=”System.Net”
type=”System.Diagnostics.TextWriterTraceListener”
initializeData=”System.Net.trace.log”
traceOutputOptions = “ProcessId, DateTime”
/>
</sharedListeners>
<switches>
<add name=”System.Net” value=”Verbose” />
<add name=”System.Net.Sockets” value=”Verbose” />
<add name=”System.Net.Cache” value=”Verbose” />
<add name=”System.Net.HttpListener” value=”Verbose” />
</switches>
</system.diagnostics>

Then open your debug output window in Visual Studio, and run the application:

System.Net Verbose: 0 : [14844] WebClient#45410999::DownloadString(https://icanhazip.com/#1694709953)
System.Net Verbose: 0 : [14844] WebClient#45410999::DownloadData(https://icanhazip.com/#1694709953)
System.Net Verbose: 0 : [14844] WebRequest::Create(https://icanhazip.com/)
System.Net Verbose: 0 : [14844] HttpWebRequest#49911653::HttpWebRequest(https://icanhazip.com/#1694709953)
System.Net Information: 0 : [14844] Current OS installation type is ‘Client’.
System.Net Information: 0 : [14844] RAS supported: True
System.Net Verbose: 0 : [14844] Exiting HttpWebRequest#49911653::HttpWebRequest()
System.Net Verbose: 0 : [14844] Exiting WebRequest::Create() -> HttpWebRequest#49911653
System.Net Verbose: 0 : [14844] HttpWebRequest#49911653::GetResponse()
System.Net Error: 0 : [14844] Can’t retrieve proxy settings for Uri ‘https://icanhazip.com/&#8217;. Error code: 12006.
System.Net Verbose: 0 : [14844] ServicePoint#15409429::ServicePoint(icanhazip.com:443)
System.Net Information: 0 : [14844] Associating HttpWebRequest#49911653 with ServicePoint#15409429
System.Net Information: 0 : [14844] Associating Connection#27806816 with HttpWebRequest#49911653
System.Net.Sockets Verbose: 0 : [14844] Socket#66337667::Socket(AddressFamily#2)
System.Net.Sockets Verbose: 0 : [14844] Exiting Socket#66337667::Socket()
System.Net.Sockets Verbose: 0 : [14844] Socket#35489797::Socket(AddressFamily#23)
System.Net.Sockets Verbose: 0 : [14844] Exiting Socket#35489797::Socket()
System.Net.Sockets Verbose: 0 : [14844] DNS::TryInternalResolve(icanhazip.com)
System.Net.Sockets Verbose: 0 : [14844] Socket#66337667::Connect(64.182.208.184:443#-1194280965)
System.Net.Sockets Information: 0 : [14844] Socket#66337667 – Created connection from 10.0.10.10:55077 to 64.182.208.184:443.
System.Net.Sockets Verbose: 0 : [14844] Exiting Socket#66337667::Connect()
System.Net.Sockets Verbose: 0 : [14844] Socket#35489797::Close()
System.Net.Sockets Verbose: 0 : [14844] Socket#35489797::Dispose()
System.Net.Sockets Verbose: 0 : [14844] Exiting Socket#35489797::Close()
System.Net Information: 0 : [14844] Connection#27806816 – Created connection from 10.0.10.10:55077 to 64.182.208.184:443.
System.Net Information: 0 : [14844] TlsStream#45795543::.ctor(host=icanhazip.com, #certs=0)
System.Net Information: 0 : [14844] Associating HttpWebRequest#49911653 with ConnectStream#65677972
System.Net Information: 0 : [14844] HttpWebRequest#49911653 – Request: GET / HTTP/1.1

System.Net Information: 0 : [14844] ConnectStream#65677972 – Sending headers
{
Host: icanhazip.com
Connection: Keep-Alive
}.
System.Net Information: 0 : [14844] SecureChannel#8442299::.ctor(hostname=icanhazip.com, #clientCertificates=0, encryptionPolicy=RequireEncryption)
System.Net Information: 0 : [14844] Enumerating security packages:
System.Net Information: 0 : [14844] Negotiate
System.Net Information: 0 : [14844] NegoExtender
System.Net Information: 0 : [14844] pku2u
System.Net Information: 0 : [14844] WDigest
System.Net Information: 0 : [14844] Kerberos
System.Net Information: 0 : [14844] NTLM
System.Net Information: 0 : [14844] TSSSP
System.Net Information: 0 : [14844] Schannel
System.Net Information: 0 : [14844] Microsoft Unified Security Protocol Provider
System.Net Information: 0 : [14844] CREDSSP
System.Net Information: 0 : [14844] SecureChannel#8442299 – Left with 0 client certificates to choose from.
System.Net Information: 0 : [14844] AcquireCredentialsHandle(package = Microsoft Unified Security Protocol Provider, intent = Outbound, scc = System.Net.SecureCredential)
System.Net Information: 0 : [14844] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = (null), targetName = icanhazip.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [14844] InitializeSecurityContext(In-Buffer length=0, Out-Buffer length=131, returned code=ContinueNeeded).
System.Net.Sockets Verbose: 0 : [14844] Socket#66337667::Send()
System.Net.Sockets Verbose: 0 : [14844] Data from Socket#66337667::Send
System.Net.Sockets Verbose: 0 : [14844] 00000000 : 16 03 01 00 7E 01 00 00-7A 03 01 58 C8 21 24 DA : ….~…z..X.!$.
System.Net.Sockets Verbose: 0 : [14844] 00000010 : FB 3F B4 AB 61 1E 6B 28-F6 F7 5B 11 9C 35 50 69 : .?..a.k(..[..5Pi
System.Net.Sockets Verbose: 0 : [14844] 00000020 : 41 B0 99 5B 83 07 50 D3-38 21 BE 00 00 1C C0 0A : A..[..P.8!……
System.Net.Sockets Verbose: 0 : [14844] 00000030 : C0 09 C0 14 C0 13 00 39-00 33 00 35 00 2F 00 0A : …….9.3.5./..
System.Net.Sockets Verbose: 0 : [14844] 00000040 : 00 38 00 32 00 13 00 05-00 04 01 00 00 35 00 00 : .8.2………5..
System.Net.Sockets Verbose: 0 : [14844] 00000050 : 00 12 00 10 00 00 0D 69-63 61 6E 68 61 7A 69 70 : …….icanhazip
System.Net.Sockets Verbose: 0 : [14844] 00000060 : 2E 63 6F 6D 00 0A 00 08-00 06 00 1D 00 17 00 18 : .com…………
System.Net.Sockets Verbose: 0 : [14844] 00000070 : 00 0B 00 02 01 00 00 23-00 00 00 17 00 00 FF 01 : …….#……..
System.Net.Sockets Verbose: 0 : [14844] 00000080 : 00 01 00 : …
System.Net.Sockets Verbose: 0 : [14844] Exiting Socket#66337667::Send() -> Int32#131
System.Net.Sockets Verbose: 0 : [14844] Socket#66337667::Receive()
System.Net.Sockets Verbose: 0 : [14844] Data from Socket#66337667::Receive
System.Net.Sockets Verbose: 0 : [14844] 00000000 : 16 03 01 00 41 : ….A
System.Net.Sockets Verbose: 0 : [14844] Exiting Socket#66337667::Receive() -> Int32#5
System.Net.Sockets Verbose: 0 : [14844] Socket#66337667::Receive()
System.Net.Sockets Verbose: 0 : [14844] Data from Socket#66337667::Receive
System.Net.Sockets Verbose: 0 : [14844] 00000005 : 02 00 00 3D 03 01 84 51-59 24 76 EF 5E 1E 80 E8 : …=…QY$v.^…
System.Net.Sockets Verbose: 0 : [14844] 00000015 : 0B 3D 6F FB F0 17 34 28-00 DD A6 C4 FE 7E 46 A7 : .=o…4(…..~F.
System.Net.Sockets Verbose: 0 : [14844] 00000025 : 6E D7 A9 0D F9 91 00 C0-13 00 00 15 00 00 00 00 : n……………
System.Net.Sockets Verbose: 0 : [14844] 00000035 : FF 01 00 01 00 00 0B 00-04 03 00 01 02 00 23 00 : …………..#.
System.Net.Sockets Verbose: 0 : [14844] 00000045 : 00 : .
System.Net.Sockets Verbose: 0 : [14844] Exiting Socket#66337667::Receive() -> Int32#65
System.Net Information: 0 : [14844] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 528a550:5292d30, targetName = icanhazip.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [14844] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=ContinueNeeded).
System.Net.Sockets Verbose: 0 : [14844] Socket#66337667::Receive()
System.Net.Sockets Verbose: 0 : [14844] Data from Socket#66337667::Receive
System.Net.Sockets Verbose: 0 : [14844] 00000000 : 16 03 01 0A CD : …..
System.Net.Sockets Verbose: 0 : [14844] Exiting Socket#66337667::Receive() -> Int32#5
System.Net.Sockets Verbose: 0 : [14844] Socket#66337667::Receive()
System.Net.Sockets Verbose: 0 : [14844] Data from Socket#66337667::Receive
System.Net.Sockets Verbose: 0 : [14844] (printing 1024 out of 2765)
System.Net.Sockets Verbose: 0 : [14844] 00000005 : 0B 00 0A C9 00 0A C6 00-06 2A 30 82 06 26 30 82 : ………*0..&0.
System.Net.Sockets Verbose: 0 : [14844] 00000015 : 05 0E A0 03 02 01 02 02-12 03 25 43 75 7F B8 B5 : ……….%Cu…
System.Net.Sockets Verbose: 0 : [14844] 00000025 : 5F 9A 98 84 D4 B4 87 C9-E1 2A A0 30 0D 06 09 2A : _……..*.0…*
System.Net.Sockets Verbose: 0 : [14844] 00000035 : 86 48 86 F7 0D 01 01 0B-05 00 30 4A 31 0B 30 09 : .H……..0J1.0.
System.Net.Sockets Verbose: 0 : [14844] 00000045 : 06 03 55 04 06 13 02 55-53 31 16 30 14 06 03 55 : ..U….US1.0…U
System.Net.Sockets Verbose: 0 : [14844] 00000055 : 04 0A 13 0D 4C 65 74 27-73 20 45 6E 63 72 79 70 : ….Let’s Encryp
System.Net.Sockets Verbose: 0 : [14844] 00000065 : 74 31 23 30 21 06 03 55-04 03 13 1A 4C 65 74 27 : t1#0!..U….Let’
System.Net.Sockets Verbose: 0 : [14844] 00000075 : 73 20 45 6E 63 72 79 70-74 20 41 75 74 68 6F 72 : s Encrypt Author
System.Net.Sockets Verbose: 0 : [14844] 00000085 : 69 74 79 20 58 33 30 1E-17 0D 31 37 30 32 32 32 : ity X30…170222
System.Net.Sockets Verbose: 0 : [14844] 00000095 : 31 38 31 37 30 30 5A 17-0D 31 37 30 35 32 33 31 : 181700Z..1705231
System.Net.Sockets Verbose: 0 : [14844] 000000A5 : 38 31 37 30 30 5A 30 18-31 16 30 14 06 03 55 04 : 81700Z0.1.0…U.
System.Net.Sockets Verbose: 0 : [14844] 000000B5 : 03 13 0D 69 63 61 6E 68-61 7A 69 70 2E 63 6F 6D : …icanhazip.com
System.Net.Sockets Verbose: 0 : [14844] 000000C5 : 30 82 02 22 30 0D 06 09-2A 86 48 86 F7 0D 01 01 : 0..”0…*.H…..
System.Net.Sockets Verbose: 0 : [14844] 000000D5 : 01 05 00 03 82 02 0F 00-30 82 02 0A 02 82 02 01 : ……..0…….
System.Net.Sockets Verbose: 0 : [14844] 000000E5 : 00 A6 6F F5 F3 50 A2 34-3C ED 9A D3 E1 8E 9B 2A : ..o..P.4<……*
System.Net.Sockets Verbose: 0 : [14844] 000000F5 : 04 FC F6 03 26 AE 0D 3D-AE B9 82 B5 9E 8E 5E 85 : ….&..=……^.
System.Net.Sockets Verbose: 0 : [14844] 00000105 : F3 79 76 46 99 F1 C3 5B-93 A3 91 28 3C 99 1F 64 : .yvF…[…(<..d
System.Net.Sockets Verbose: 0 : [14844] 00000115 : 70 BA AF 48 E6 EA 71 C4-76 18 5D 8D 28 72 BC 96 : p..H..q.v.].(r..
System.Net.Sockets Verbose: 0 : [14844] 00000125 : 27 29 22 57 21 CC FD 8E-B4 E2 67 EA 35 A9 EE F6 : ‘)”W!…..g.5…
System.Net.Sockets Verbose: 0 : [14844] 00000135 : C5 AF 54 B7 6F F7 A0 05-C4 7B 7E 67 2E 81 16 69 : ..T.o….{~g…i
System.Net.Sockets Verbose: 0 : [14844] 00000145 : 08 61 A0 91 21 BC 93 6D-9B 4A 67 F6 2B 32 F0 71 : .a..!..m.Jg.+2.q
System.Net.Sockets Verbose: 0 : [14844] 00000155 : D7 F0 04 3B D2 F7 F4 AA-A2 F3 00 B4 D3 45 A5 EE : …;………E..
System.Net.Sockets Verbose: 0 : [14844] 00000165 : 57 6E 14 84 63 3E 1A BC-B5 80 32 42 97 41 1B 87 : Wn..c>….2B.A..
System.Net.Sockets Verbose: 0 : [14844] 00000175 : 28 59 A2 29 A9 66 38 27-D7 D1 0F CD 58 B2 6D 19 : (Y.).f8’….X.m.
System.Net.Sockets Verbose: 0 : [14844] 00000185 : 6D 65 AA FE A9 41 51 14-7F 31 5B 57 58 26 AC 11 : me…AQ..1[WX&..
System.Net.Sockets Verbose: 0 : [14844] 00000195 : F7 E1 9B AC 86 DC C7 22-6E 85 47 69 46 95 41 9E : …….”n.GiF.A.
System.Net.Sockets Verbose: 0 : [14844] 000001A5 : 8C 39 FC 26 56 FA 80 55-21 55 42 F8 C6 92 BE 9B : .9.&V..U!UB…..
System.Net.Sockets Verbose: 0 : [14844] 000001B5 : 51 0B 4B BA CB 29 E3 8D-80 54 3C B9 50 D1 F3 D3 : Q.K..)…T<.P…
System.Net.Sockets Verbose: 0 : [14844] 000001C5 : 05 C1 F1 07 EF 7F A6 F7-96 9F F2 BB BC 2F 70 F6 : …………./p.
System.Net.Sockets Verbose: 0 : [14844] 000001D5 : 37 8B 46 6B 7A 6A B4 E7-FE 9D F9 B7 83 2E A4 2F : 7.Fkzj………/
System.Net.Sockets Verbose: 0 : [14844] 000001E5 : 16 E7 F4 38 09 99 78 82-1E F3 6B A1 DD 1E 2D BA : …8..x…k…-.
System.Net.Sockets Verbose: 0 : [14844] 000001F5 : 89 00 B6 13 B4 16 84 C1-06 FB E1 E3 E7 54 9B BC : ………….T..
System.Net.Sockets Verbose: 0 : [14844] 00000205 : A3 08 07 09 9E CF EF 5F-14 28 80 F9 E8 E0 96 17 : ……._.(……
System.Net.Sockets Verbose: 0 : [14844] 00000215 : E0 51 B0 0C 94 7D D2 2E-5D 4E 52 02 0B 24 08 4A : .Q…}..]NR..$.J
System.Net.Sockets Verbose: 0 : [14844] 00000225 : 2C 2A 4F EF FF 15 8C 36-DE 10 C6 9F 04 5E A9 9F : ,*O….6…..^..
System.Net.Sockets Verbose: 0 : [14844] 00000235 : E6 D5 D4 15 2E F0 18 D9-B6 F8 71 28 F2 3E 2D D1 : ……….q(.>-.
System.Net.Sockets Verbose: 0 : [14844] 00000245 : F3 C0 1D 7D 19 1A B4 B6-DB BE 29 6F 16 BF B6 A2 : …}……)o….
System.Net.Sockets Verbose: 0 : [14844] 00000255 : 39 89 15 E7 A6 25 6D F2-8F C6 58 82 AD 87 98 A3 : 9….%m…X…..
System.Net.Sockets Verbose: 0 : [14844] 00000265 : CE 9C F9 32 11 FE DB 93-4D 39 20 38 B7 78 7B F5 : …2….M9 8.x{.
System.Net.Sockets Verbose: 0 : [14844] 00000275 : 5C 97 CF 4A 48 52 0B 9B-59 72 EE 7A 1A 9A 2A 59 : \..JHR..Yr.z..*Y
System.Net.Sockets Verbose: 0 : [14844] 00000285 : 48 E9 D0 07 B7 B3 00 BC-F9 09 43 13 2D 6C 28 17 : H………C.-l(.
System.Net.Sockets Verbose: 0 : [14844] 00000295 : 17 8A A5 64 78 28 D5 E7-08 BE 6D FF 65 10 C4 83 : …dx(….m.e…
System.Net.Sockets Verbose: 0 : [14844] 000002A5 : EE A0 1F B0 DB 4F EC 11-87 AD 99 F9 28 F2 87 54 : …..O……(..T
System.Net.Sockets Verbose: 0 : [14844] 000002B5 : 29 25 C6 B7 4F 71 E8 15-3F 79 64 24 96 29 5C 6C : )%..Oq..?yd$.)\l
System.Net.Sockets Verbose: 0 : [14844] 000002C5 : 10 39 38 CD 4C 26 12 92-58 3A 9E 6F 0B 71 26 E4 : .98.L&..X:.o.q&.
System.Net.Sockets Verbose: 0 : [14844] 000002D5 : 6D C9 43 61 17 A2 F3 D4-EB 9B 4D BC 19 EC 31 46 : m.Ca……M…1F
System.Net.Sockets Verbose: 0 : [14844] 000002E5 : B3 02 03 01 00 01 A3 82-02 36 30 82 02 32 30 0E : ………60..20.
System.Net.Sockets Verbose: 0 : [14844] 000002F5 : 06 03 55 1D 0F 01 01 FF-04 04 03 02 05 A0 30 1D : ..U………..0.
System.Net.Sockets Verbose: 0 : [14844] 00000305 : 06 03 55 1D 25 04 16 30-14 06 08 2B 06 01 05 05 : ..U.%..0…+….
System.Net.Sockets Verbose: 0 : [14844] 00000315 : 07 03 01 06 08 2B 06 01-05 05 07 03 02 30 0C 06 : …..+…….0..
System.Net.Sockets Verbose: 0 : [14844] 00000325 : 03 55 1D 13 01 01 FF 04-02 30 00 30 1D 06 03 55 : .U…….0.0…U
System.Net.Sockets Verbose: 0 : [14844] 00000335 : 1D 0E 04 16 04 14 F0 BB-8A C1 56 E4 2E 97 36 D4 : ……….V…6.
System.Net.Sockets Verbose: 0 : [14844] 00000345 : 69 CB D1 9B F8 11 05 DB-0E 94 30 1F 06 03 55 1D : i………0…U.
System.Net.Sockets Verbose: 0 : [14844] 00000355 : 23 04 18 30 16 80 14 A8-4A 6A 63 04 7D DD BA E6 : #..0….Jjc.}…
System.Net.Sockets Verbose: 0 : [14844] 00000365 : D1 39 B7 A6 45 65 EF F3-A8 EC A1 30 70 06 08 2B : .9..Ee…..0p..+
System.Net.Sockets Verbose: 0 : [14844] 00000375 : 06 01 05 05 07 01 01 04-64 30 62 30 2F 06 08 2B : ……..d0b0/..+
System.Net.Sockets Verbose: 0 : [14844] 00000385 : 06 01 05 05 07 30 01 86-23 68 74 74 70 3A 2F 2F : …..0..#http://
System.Net.Sockets Verbose: 0 : [14844] 00000395 : 6F 63 73 70 2E 69 6E 74-2D 78 33 2E 6C 65 74 73 : ocsp.int-x3.lets
System.Net.Sockets Verbose: 0 : [14844] 000003A5 : 65 6E 63 72 79 70 74 2E-6F 72 67 2F 30 2F 06 08 : encrypt.org/0/..
System.Net.Sockets Verbose: 0 : [14844] 000003B5 : 2B 06 01 05 05 07 30 02-86 23 68 74 74 70 3A 2F : +…..0..#http:/
System.Net.Sockets Verbose: 0 : [14844] 000003C5 : 2F 63 65 72 74 2E 69 6E-74 2D 78 33 2E 6C 65 74 : /cert.int-x3.let
System.Net.Sockets Verbose: 0 : [14844] 000003D5 : 73 65 6E 63 72 79 70 74-2E 6F 72 67 2F 30 40 06 : sencrypt.org/0@.
System.Net.Sockets Verbose: 0 : [14844] 000003E5 : 03 55 1D 11 04 39 30 37-82 0D 69 63 61 6E 68 61 : .U…907..icanha
System.Net.Sockets Verbose: 0 : [14844] 000003F5 : 7A 69 70 2E 63 6F 6D 82-12 69 70 76 34 2E 69 63 : zip.com..ipv4.ic
System.Net.Sockets Verbose: 0 : [14844] Exiting Socket#66337667::Receive() -> Int32#2765
System.Net Information: 0 : [14844] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 528a550:5292d30, targetName = icanhazip.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [14844] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=ContinueNeeded).
System.Net.Sockets Verbose: 0 : [14844] Socket#66337667::Receive()
System.Net.Sockets Verbose: 0 : [14844] Data from Socket#66337667::Receive
System.Net.Sockets Verbose: 0 : [14844] 00000000 : 16 03 01 02 4B : ….K
System.Net.Sockets Verbose: 0 : [14844] Exiting Socket#66337667::Receive() -> Int32#5
System.Net.Sockets Verbose: 0 : [14844] Socket#66337667::Receive()
System.Net.Sockets Verbose: 0 : [14844] Data from Socket#66337667::Receive
System.Net.Sockets Verbose: 0 : [14844] 00000005 : 0C 00 02 47 03 00 17 41-04 B5 A7 D5 62 12 DC EF : …G…A….b…
System.Net.Sockets Verbose: 0 : [14844] 00000015 : 1D E3 98 AD 55 3E 47 1F-92 28 37 34 03 38 2B 5C : ….U>G..(74.8+\
System.Net.Sockets Verbose: 0 : [14844] 00000025 : 96 EA FE 6A 41 AB E7 69-74 5C CC 4A 1C 54 6D 2F : …jA..it\.J.Tm/
System.Net.Sockets Verbose: 0 : [14844] 00000035 : 99 C5 36 CB 5A AA 8D 58-63 C0 99 ED 1A 06 A6 B6 : ..6.Z..Xc…….
System.Net.Sockets Verbose: 0 : [14844] 00000045 : 9A E9 52 19 66 30 45 23-79 02 00 45 2D 22 77 EB : ..R.f0E#y..E-“w.
System.Net.Sockets Verbose: 0 : [14844] 00000055 : E6 3F 1F 75 FB 1B 04 E0-62 5A 5C 32 E7 F5 94 B8 : .?.u….bZ\2….
System.Net.Sockets Verbose: 0 : [14844] 00000065 : 97 30 9D 2B 45 B3 D1 BE-A5 C6 55 67 FC 10 40 CD : .0.+E…..Ug..@.
System.Net.Sockets Verbose: 0 : [14844] 00000075 : 5D 04 A0 AF 0A 09 04 41-EC A3 79 A9 F4 A9 DB 3A : ]……A..y….:
System.Net.Sockets Verbose: 0 : [14844] 00000085 : 86 DC FD 46 A6 E4 8C CD-6B F3 9A F6 BB 6A 4C E7 : …F….k….jL.
System.Net.Sockets Verbose: 0 : [14844] 00000095 : AF B1 F2 8A 5E 74 D5 77-49 07 76 A4 DC 9F 25 28 : ….^t.wI.v…%(
System.Net.Sockets Verbose: 0 : [14844] 000000A5 : 36 85 77 28 94 06 C0 CC-96 34 32 2F C2 5D 86 74 : 6.w(…..42/.].t
System.Net.Sockets Verbose: 0 : [14844] 000000B5 : 04 55 A5 4A 12 F3 EA BD-08 D8 11 22 23 C5 7B 35 : .U.J…….”#.{5
System.Net.Sockets Verbose: 0 : [14844] 000000C5 : 7E 74 B2 08 12 BE AC A4-36 5D 0D BE AF 9D 38 74 : ~t……6]….8t
System.Net.Sockets Verbose: 0 : [14844] 000000D5 : 8B F5 D2 65 E5 13 6F 5F-CF DB 5F 0D 8E E5 DA F5 : …e..o_.._…..
System.Net.Sockets Verbose: 0 : [14844] 000000E5 : 16 42 9F 8B 86 64 67 F5-0B 2B A9 36 D5 68 59 3A : .B…dg..+.6.hY:
System.Net.Sockets Verbose: 0 : [14844] 000000F5 : C1 F2 FE FA 36 F3 4E 20-7C 0C 46 3F 60 5F 77 EC : ….6.N |.F?`_w.
System.Net.Sockets Verbose: 0 : [14844] 00000105 : F2 75 90 B9 A2 A2 31 F0-4E 9D 8D 9E 58 68 FD 45 : .u….1.N…Xh.E
System.Net.Sockets Verbose: 0 : [14844] 00000115 : FD AE C0 1A D8 E1 0A C6-0E 51 57 27 30 47 EE 81 : ………QW’0G..
System.Net.Sockets Verbose: 0 : [14844] 00000125 : F9 F2 87 3D 72 13 D1 E2-58 5A 12 E0 B7 A3 12 EC : …=r…XZ……
System.Net.Sockets Verbose: 0 : [14844] 00000135 : D3 23 F5 DC 23 0D 58 CE-77 C7 CB 66 F7 2F B3 5F : .#..#.X.w..f./._
System.Net.Sockets Verbose: 0 : [14844] 00000145 : 4C 62 E5 6F FF BC DA 44-4A 98 07 28 B0 D9 57 34 : Lb.o…DJ..(..W4
System.Net.Sockets Verbose: 0 : [14844] 00000155 : BB E2 C6 68 5B CE 9D 46-EA BA 0C 00 22 1E 99 96 : …h[..F….”…
System.Net.Sockets Verbose: 0 : [14844] 00000165 : F4 27 C7 57 F0 79 4A CC-AA 56 59 F5 FE F0 85 56 : .’.W.yJ..VY….V
System.Net.Sockets Verbose: 0 : [14844] 00000175 : 94 E9 0B EF AA EF 1E 53-CF AE 76 FA 35 D8 80 5C : …….S..v.5..\
System.Net.Sockets Verbose: 0 : [14844] 00000185 : 4E 6D CE E5 08 8A 35 34-D4 91 AB F4 A9 E4 5B 7A : Nm….54……[z
System.Net.Sockets Verbose: 0 : [14844] 00000195 : 17 B1 5A B5 AA E3 73 5E-41 BF 67 91 0D DD AC 86 : ..Z…s^A.g…..
System.Net.Sockets Verbose: 0 : [14844] 000001A5 : F7 66 3F F9 88 26 DD 25-1C 82 5B 46 3C F3 A7 5B : .f?..&.%..[F<..[
System.Net.Sockets Verbose: 0 : [14844] 000001B5 : 06 5B 3D 18 86 AE 40 98-32 70 D3 4A 65 92 C9 A3 : .[=…@.2p.Je…
System.Net.Sockets Verbose: 0 : [14844] 000001C5 : 3E 27 56 58 42 26 17 DD-D7 F4 31 69 18 65 FA 65 : >’VXB&….1i.e.e
System.Net.Sockets Verbose: 0 : [14844] 000001D5 : 90 0E C2 F1 25 2D 35 BE-D2 B9 E1 EF 8E 5D 45 ED : ….%-5……]E.
System.Net.Sockets Verbose: 0 : [14844] 000001E5 : BD D5 04 B3 9D 36 44 56-24 58 BC F7 40 4B CB B0 : …..6DV$X..@K..
System.Net.Sockets Verbose: 0 : [14844] 000001F5 : 30 F5 1C 75 93 C1 7C 7C-A6 64 78 6A 4A FC 17 B7 : 0..u..||.dxjJ…
System.Net.Sockets Verbose: 0 : [14844] 00000205 : 6D AF 13 3F B2 17 27 5A-6E 8F 1A A2 A5 FF 1C 26 : m..?..’Zn……&
System.Net.Sockets Verbose: 0 : [14844] 00000215 : 5C C7 05 EF BD E9 22 C0-2D 98 FD A8 3B 48 8F 61 : \…..”.-…;H.a
System.Net.Sockets Verbose: 0 : [14844] 00000225 : A2 F4 C2 2D 44 CC 75 95-2E 4B 63 E7 1E 17 D3 63 : …-D.u..Kc….c
System.Net.Sockets Verbose: 0 : [14844] 00000235 : 1A 95 91 24 12 7F E7 5C-73 DA 1A 88 E0 E2 26 32 : …$…\s…..&2
System.Net.Sockets Verbose: 0 : [14844] 00000245 : 31 3A 80 92 85 83 F2 0E-D7 35 B6 : 1:…….5.
System.Net.Sockets Verbose: 0 : [14844] Exiting Socket#66337667::Receive() -> Int32#587
System.Net Information: 0 : [14844] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 528a550:5292d30, targetName = icanhazip.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [14844] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=ContinueNeeded).
System.Net.Sockets Verbose: 0 : [14844] Socket#66337667::Receive()
System.Net.Sockets Verbose: 0 : [14844] Data from Socket#66337667::Receive
System.Net.Sockets Verbose: 0 : [14844] 00000000 : 16 03 01 00 04 : …..
System.Net.Sockets Verbose: 0 : [14844] Exiting Socket#66337667::Receive() -> Int32#5
System.Net.Sockets Verbose: 0 : [14844] Socket#66337667::Receive()
System.Net.Sockets Verbose: 0 : [14844] Data from Socket#66337667::Receive
System.Net.Sockets Verbose: 0 : [14844] 00000005 : 0E 00 00 00 : ….
System.Net.Sockets Verbose: 0 : [14844] Exiting Socket#66337667::Receive() -> Int32#4
System.Net Information: 0 : [14844] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 528a550:5292d30, targetName = icanhazip.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [14844] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=134, returned code=ContinueNeeded).
System.Net.Sockets Verbose: 0 : [14844] Socket#66337667::Send()
System.Net.Sockets Verbose: 0 : [14844] Data from Socket#66337667::Send
System.Net.Sockets Verbose: 0 : [14844] 00000000 : 16 03 01 00 46 10 00 00-42 41 04 B6 AF DC DD 67 : ….F…BA…..g
System.Net.Sockets Verbose: 0 : [14844] 00000010 : 4B EA 6B ED AF 4F 96 7B-BA BE 21 E3 48 3E C6 27 : K.k..O.{..!.H>.’
System.Net.Sockets Verbose: 0 : [14844] 00000020 : D4 7F E4 6D 31 06 38 52-3F 59 69 08 9C 6F 17 B5 : …m1.8R?Yi..o..
System.Net.Sockets Verbose: 0 : [14844] 00000030 : 05 15 34 14 06 76 D0 29-04 0B E0 E6 12 12 98 24 : ..4..v.)…….$
System.Net.Sockets Verbose: 0 : [14844] 00000040 : 99 56 62 84 E4 53 00 EB-C1 68 DC 14 03 01 00 01 : .Vb..S…h……
System.Net.Sockets Verbose: 0 : [14844] 00000050 : 01 16 03 01 00 30 EF 5F-29 9F 1E 53 14 81 E8 FD : …..0._)..S….
System.Net.Sockets Verbose: 0 : [14844] 00000060 : 25 C8 C6 64 A9 74 6C D6-5A 1B 7C FD 43 2C FB 5F : %..d.tl.Z.|.C,._
System.Net.Sockets Verbose: 0 : [14844] 00000070 : CF 8B 37 17 8C F0 93 9A-6C 77 A6 68 69 64 9A 4D : ..7…..lw.hid.M
System.Net.Sockets Verbose: 0 : [14844] 00000080 : 9E FE A4 73 03 BF : …s..
System.Net.Sockets Verbose: 0 : [14844] Exiting Socket#66337667::Send() -> Int32#134
System.Net.Sockets Verbose: 0 : [14844] Socket#66337667::Receive()
System.Net.Sockets Verbose: 0 : [14844] Data from Socket#66337667::Receive
System.Net.Sockets Verbose: 0 : [14844] 00000000 : 16 03 01 00 CA : …..
System.Net.Sockets Verbose: 0 : [14844] Exiting Socket#66337667::Receive() -> Int32#5
System.Net.Sockets Verbose: 0 : [14844] Socket#66337667::Receive()
System.Net.Sockets Verbose: 0 : [14844] Data from Socket#66337667::Receive
System.Net.Sockets Verbose: 0 : [14844] 00000005 : 04 00 00 C6 00 00 01 2C-00 C0 D0 2C C6 C9 61 C5 : …….,…,..a.
System.Net.Sockets Verbose: 0 : [14844] 00000015 : EE 75 1D 38 34 D8 29 11-C3 97 4C 06 DB 5E C9 7C : .u.84.)…L..^.|
System.Net.Sockets Verbose: 0 : [14844] 00000025 : D5 3D 47 98 38 5F 41 14-3E 47 22 3C 9E EE 87 E3 : .=G.8_A.>G”<….
System.Net.Sockets Verbose: 0 : [14844] 00000035 : 53 E2 13 0C DB 33 DF 20-A2 7E 91 13 5E 41 8D 70 : S….3. .~..^A.p
System.Net.Sockets Verbose: 0 : [14844] 00000045 : 29 7C 7B 8E 5F E3 E6 BD-60 F1 39 0F 76 8E AB 7B : )|{._…`.9.v..{
System.Net.Sockets Verbose: 0 : [14844] 00000055 : 69 D5 0E 9B 23 D8 16 19-CC C7 A1 79 AF 56 91 26 : i…#……y.V.&
System.Net.Sockets Verbose: 0 : [14844] 00000065 : 83 E1 84 36 56 C8 25 2C-B3 E2 54 CA 27 76 CD 8C : …6V.%,..T.’v..
System.Net.Sockets Verbose: 0 : [14844] 00000075 : A9 63 AC F0 2A E8 34 D6-B6 85 75 28 C0 32 CE 9D : .c..*.4…u(.2..
System.Net.Sockets Verbose: 0 : [14844] 00000085 : 36 26 3E 33 65 CF E4 E3-78 39 94 AA F2 9E D9 FC : 6&>3e…x9……
System.Net.Sockets Verbose: 0 : [14844] 00000095 : CE 41 C2 3C 33 C8 83 67-4D 53 8D 08 2A CA 2A 3D : .A.<3..gMS..*.*=
System.Net.Sockets Verbose: 0 : [14844] 000000A5 : 8D 4A 9A 1C B0 DF 6E C7-A5 AC AA 11 59 58 20 9F : .J….n…..YX .
System.Net.Sockets Verbose: 0 : [14844] 000000B5 : F3 CB 10 52 5B E2 34 D6-11 F7 6A 90 50 78 0C 9E : …R[.4…j.Px..
System.Net.Sockets Verbose: 0 : [14844] 000000C5 : 89 82 CC 41 BA 67 FD 64-15 1E : …A.g.d..
System.Net.Sockets Verbose: 0 : [14844] Exiting Socket#66337667::Receive() -> Int32#202
System.Net Information: 0 : [14844] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 528a550:5292d30, targetName = icanhazip.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [14844] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=ContinueNeeded).
System.Net.Sockets Verbose: 0 : [14844] Socket#66337667::Receive()
System.Net.Sockets Verbose: 0 : [14844] Data from Socket#66337667::Receive
System.Net.Sockets Verbose: 0 : [14844] 00000000 : 14 03 01 00 01 : …..
System.Net.Sockets Verbose: 0 : [14844] Exiting Socket#66337667::Receive() -> Int32#5
System.Net.Sockets Verbose: 0 : [14844] Socket#66337667::Receive()
System.Net.Sockets Verbose: 0 : [14844] Data from Socket#66337667::Receive
System.Net.Sockets Verbose: 0 : [14844] 00000005 : 01 : .
System.Net.Sockets Verbose: 0 : [14844] Exiting Socket#66337667::Receive() -> Int32#1
System.Net Information: 0 : [14844] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 528a550:5292d30, targetName = icanhazip.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [14844] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=ContinueNeeded).
System.Net.Sockets Verbose: 0 : [14844] Socket#66337667::Receive()
System.Net.Sockets Verbose: 0 : [14844] Data from Socket#66337667::Receive
System.Net.Sockets Verbose: 0 : [14844] 00000000 : 16 03 01 00 30 : ….0
System.Net.Sockets Verbose: 0 : [14844] Exiting Socket#66337667::Receive() -> Int32#5
System.Net.Sockets Verbose: 0 : [14844] Socket#66337667::Receive()
System.Net.Sockets Verbose: 0 : [14844] Data from Socket#66337667::Receive
System.Net.Sockets Verbose: 0 : [14844] 00000005 : CB 90 20 4F 84 7D 96 66-D0 E9 06 E4 85 42 1A 96 : .. O.}.f…..B..
System.Net.Sockets Verbose: 0 : [14844] 00000015 : 9F 04 D0 F8 62 8B 70 C9-C2 F4 4E A5 78 E5 D5 B9 : ….b.p…N.x…
System.Net.Sockets Verbose: 0 : [14844] 00000025 : AE 33 0F 10 A7 DB 88 36-9B 8A 3F 3D 40 8E 07 75 : .3…..6..?=@..u
System.Net.Sockets Verbose: 0 : [14844] Exiting Socket#66337667::Receive() -> Int32#48
System.Net Information: 0 : [14844] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 528a550:5292d30, targetName = icanhazip.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [14844] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=OK).
System.Net Information: 0 : [14844] Remote certificate: [Version]
V3

[Subject]
CN=icanhazip.com
Simple Name: icanhazip.com
DNS Name: ipv6.icanhazip.com

[Issuer]
CN=Let’s Encrypt Authority X3, O=Let’s Encrypt, C=US
Simple Name: Let’s Encrypt Authority X3
DNS Name: Let’s Encrypt Authority X3

[Serial Number]
032543757FB8B55F9A9884D4B487C9E12AA0

[Not Before]
22/02/2017 18:17:00

[Not After]
23/05/2017 19:17:00

[Thumbprint]
433DABC9DB9B7F60D7981C43C0B2E1AC22C83B63

[Signature Algorithm]
sha256RSA(1.2.840.113549.1.1.11)

[Public Key]
Algorithm: RSA
Length: 4096
Key Blob: 30 82 02 0a 02 82 02 01 00 a6 6f f5 f3 50 a2 34 3c ed 9a d3 e1 8e 9b 2a 04 fc f6 03 26 ae 0d 3d ae b9 82 b5 9e 8e 5e 85 f3 79 76 46 99 f1 c3 5b 93 a3 91 28 3c 99 1f 64 70 ba af 48 e6 ea 71 c4 76 18 5d 8d 28 72 bc 96 27 29 22 57 21 cc fd 8e b4 e2 67 ea 35 a9 ee f6 c5 af 54 b7 6f f7 a0 05 c4 7b 7e 67 2e 81 16 69 08 61 a0 91 21 bc 93 6d 9b 4a 67 f6 2b 32 f0 71 d7 f0 04 3b d2 f7 f4 aa a2 f3 00 b4 d3 45 a5 ee 57 6e 14 84 63 3e 1a bc b5 80 3….
System.Net Information: 0 : [14844] SecureChannel#8442299 – Remote certificate was verified as valid by the user.
System.Net Information: 0 : [14844] ProcessAuthentication(Protocol=Tls, Cipher=Aes128 128 bit strength, Hash=Sha1 160 bit strength, Key Exchange=44550 256 bit strength).
System.Net.Sockets Verbose: 0 : [14844] Socket#66337667::Send()
System.Net.Sockets Verbose: 0 : [14844] Data from Socket#66337667::Send
System.Net.Sockets Verbose: 0 : [14844] 00000000 : 17 03 01 00 20 A6 49 B1-D3 B5 F6 02 83 A5 41 2D : …. .I…….A-
System.Net.Sockets Verbose: 0 : [14844] 00000010 : DF DA B3 AA 0B 01 1B 93-1A 10 3E F6 C0 11 ED 8B : ……….>…..
System.Net.Sockets Verbose: 0 : [14844] 00000020 : 07 0D 40 A7 CE 17 03 01-00 60 19 59 77 BB A9 CF : ..@……`.Yw…
System.Net.Sockets Verbose: 0 : [14844] 00000030 : 83 5B CF E9 12 B7 C0 D5-F8 AF 91 B8 93 01 5B 8A : .[…………[.
System.Net.Sockets Verbose: 0 : [14844] 00000040 : C3 70 C9 62 E7 3D 3B 69-F2 CB E3 BD E4 4B 60 1C : .p.b.=;i…..K`.
System.Net.Sockets Verbose: 0 : [14844] 00000050 : 6B 38 C2 E6 2E 20 1F E4-84 14 EC 70 75 95 45 B4 : k8… …..pu.E.
System.Net.Sockets Verbose: 0 : [14844] 00000060 : E8 23 A1 31 E4 44 26 19-3A A1 18 35 C7 88 F9 B0 : .#.1.D&.:..5….
System.Net.Sockets Verbose: 0 : [14844] 00000070 : 8F 21 35 24 35 EE 47 1C-2F AA 89 C9 DB 4B 27 3D : .!5$5.G./….K’=
System.Net.Sockets Verbose: 0 : [14844] 00000080 : 47 BB 3E 9A 83 74 D3 F0-AC F1 : G.>..t….
System.Net.Sockets Verbose: 0 : [14844] Exiting Socket#66337667::Send() -> Int32#138
System.Net.Sockets Verbose: 0 : [14844] Socket#66337667::Receive()
System.Net.Sockets Verbose: 0 : [14844] Data from Socket#66337667::Receive
System.Net.Sockets Verbose: 0 : [14844] 00000000 : 17 03 01 02 50 : ….P
System.Net.Sockets Verbose: 0 : [14844] Exiting Socket#66337667::Receive() -> Int32#5
System.Net.Sockets Verbose: 0 : [14844] Socket#66337667::Receive()
System.Net.Sockets Verbose: 0 : [14844] Data from Socket#66337667::Receive
System.Net.Sockets Verbose: 0 : [14844] 00000005 : F8 E9 11 2F 5F F6 5E E4-CD DA 80 8C F9 9A 3E 4A : …/_.^…….>J
System.Net.Sockets Verbose: 0 : [14844] 00000015 : FF E3 1E FC 86 F6 C0 7D-88 39 F4 37 09 D4 38 06 : …….}.9.7..8.
System.Net.Sockets Verbose: 0 : [14844] 00000025 : DA 01 C9 65 7D 2C 00 B5-59 83 9C 32 39 92 F9 08 : …e},..Y..29…
System.Net.Sockets Verbose: 0 : [14844] 00000035 : BA AD 42 C1 31 51 1A E4-89 A9 1A 8C 54 BE CD 32 : ..B.1Q……T..2
System.Net.Sockets Verbose: 0 : [14844] 00000045 : 47 6E 06 1E 9F 42 9E E6-34 65 84 17 F3 32 E8 E8 : Gn…B..4e…2..
System.Net.Sockets Verbose: 0 : [14844] 00000055 : B6 8A 94 17 8C 94 11 5B-E9 C3 BC 0D 8E 45 A0 56 : …….[…..E.V
System.Net.Sockets Verbose: 0 : [14844] 00000065 : 60 C8 3D 35 25 1F 47 4C-0A E5 A6 E5 B5 DD A3 4A : `.=5%.GL…….J
System.Net.Sockets Verbose: 0 : [14844] 00000075 : 30 27 D9 99 83 4D F8 0D-B8 D3 26 C0 B9 86 C3 E2 : 0’…M….&…..
System.Net.Sockets Verbose: 0 : [14844] 00000085 : 7C 3F 7C B5 A4 3A B5 08-0D E7 1B 05 9F 0A 05 19 : |?|..:……….
System.Net.Sockets Verbose: 0 : [14844] 00000095 : DE 41 D1 CE 17 A1 99 59-F9 43 6E BD E5 D5 05 70 : .A…..Y.Cn….p
System.Net.Sockets Verbose: 0 : [14844] 000000A5 : F1 5A EC E1 2D 8B CD 14-2C 6A 65 AF 78 5E 6D 2A : .Z..-…,je.x^m*
System.Net.Sockets Verbose: 0 : [14844] 000000B5 : D1 A2 0B 27 54 60 D3 63-84 7A AD 5F 58 C7 52 F5 : …’T`.c.z._X.R.
System.Net.Sockets Verbose: 0 : [14844] 000000C5 : F0 0A A3 1B 59 83 23 43-87 F0 55 03 0F 01 5B EE : ….Y.#C..U…[.
System.Net.Sockets Verbose: 0 : [14844] 000000D5 : 0A F3 B1 74 F8 14 C8 1B-CB F1 81 AE 84 98 0C 1D : …t…………
System.Net.Sockets Verbose: 0 : [14844] 000000E5 : 9B A6 3B 5B 1F 16 A1 3C-37 60 9F FB 75 0B 51 D1 : ..;[…<7`..u.Q.
System.Net.Sockets Verbose: 0 : [14844] 000000F5 : 6C 9D 34 07 32 4E EE 84-26 FD A7 14 DB 00 B9 B9 : l.4.2N..&…….
System.Net.Sockets Verbose: 0 : [14844] 00000105 : 0A 59 3A 69 7F CD 25 CB-27 C4 A7 D3 D0 2E 03 6D : .Y:i..%.’……m
System.Net.Sockets Verbose: 0 : [14844] 00000115 : 28 A8 14 B7 6C BA 78 07-A9 A0 5E E1 AC 8C AA 58 : (…l.x…^….X
System.Net.Sockets Verbose: 0 : [14844] 00000125 : 35 BF 9E C8 1E 4F DE 1D-0E 1E 9E 9A 1E F3 1D 64 : 5….O………d
System.Net.Sockets Verbose: 0 : [14844] 00000135 : C6 15 02 86 15 23 C9 FB-EF 53 0C CD 4A DE 63 DD : …..#…S..J.c.
System.Net.Sockets Verbose: 0 : [14844] 00000145 : 3F 49 EB 63 BA AC F7 A9-A3 5F 80 DC A3 3C 36 3F : ?I.c….._…<6?
System.Net.Sockets Verbose: 0 : [14844] 00000155 : F8 90 44 13 77 47 60 9C-48 FD C6 84 E7 97 31 3A : ..D.wG`.H…..1:
System.Net.Sockets Verbose: 0 : [14844] 00000165 : 04 27 A4 03 ED FC A2 1E-AA 5F AB 06 C4 73 C7 26 : .’……._…s.&
System.Net.Sockets Verbose: 0 : [14844] 00000175 : 75 A9 50 A6 5C B9 32 CC-BA 23 FD FE A4 5C 5F C9 : u.P.\.2..#…\_.
System.Net.Sockets Verbose: 0 : [14844] 00000185 : EA F5 86 79 0B 8C 0C F7-69 C5 FC 2D 5B 07 C3 CE : …y….i..-[…
System.Net.Sockets Verbose: 0 : [14844] 00000195 : D2 BA A9 B4 21 1B F7 C6-CD AF C1 0F 2D EA C5 D0 : ….!…….-…
System.Net.Sockets Verbose: 0 : [14844] 000001A5 : 83 E7 13 C3 71 24 76 4F-38 0F E7 56 29 61 63 E7 : ….q$vO8..V)ac.
System.Net.Sockets Verbose: 0 : [14844] 000001B5 : 05 4D 22 9F 90 C5 62 55-AA 6F 42 AC 33 9F EA E7 : .M”…bU.oB.3…
System.Net.Sockets Verbose: 0 : [14844] 000001C5 : 81 66 01 85 55 AF C4 67-35 77 32 AD 22 E2 88 AD : .f..U..g5w2.”…
System.Net.Sockets Verbose: 0 : [14844] 000001D5 : 70 63 49 90 A8 D7 54 1F-44 5E FC 05 44 3E 80 F1 : pcI…T.D^..D>..
System.Net.Sockets Verbose: 0 : [14844] 000001E5 : C3 FF B9 6A D1 9F CA D9-43 5F F6 C7 2E C6 1D 1C : …j….C_……
System.Net.Sockets Verbose: 0 : [14844] 000001F5 : 96 A6 86 0A BD 2C 73 24-DE 3D 04 AF D9 AA 87 3B : …..,s$.=…..;
System.Net.Sockets Verbose: 0 : [14844] 00000205 : C0 2A 8C 0E DB 6D A5 FD-7E 4D 57 52 EA 01 4B 00 : .*…m..~MWR..K.
System.Net.Sockets Verbose: 0 : [14844] 00000215 : 93 4E 02 20 2C C1 7F 9D-F8 C1 8A 07 3B 59 9F B1 : .N. ,…….;Y..
System.Net.Sockets Verbose: 0 : [14844] 00000225 : 42 5A 2D 47 E6 27 97 1F-65 2B 56 DB 01 D5 1C 8F : BZ-G.’..e+V…..
System.Net.Sockets Verbose: 0 : [14844] 00000235 : 45 7C 5B 15 60 9C E0 CE-73 BF 11 D2 90 77 06 7A : E|[.`…s….w.z
System.Net.Sockets Verbose: 0 : [14844] 00000245 : 25 83 3E E6 92 9A 88 61-BD 43 91 F8 04 D6 13 DE : %.>….a.C……
System.Net.Sockets Verbose: 0 : [14844] Exiting Socket#66337667::Receive() -> Int32#592
System.Net Information: 0 : [14844] Connection#27806816 – Received status line: Version=1.1, StatusCode=200, StatusDescription=OK.
System.Net Information: 0 : [14844] Connection#27806816 – Received headers
{
Connection: close
X-SECURITY: This site doesn’t distribute malware. Get the facts. https://is.gd/1LWdFz
X-RTFM: Learn about this site at http://bit.ly/icanhazip-faq and don’t abuse the service.
X-BECOME-A-RACKER: If you’re reading this, apply here: https://www.rackspace.com/talent/
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET
Strict-Transport-Security: max-age=86400; includeSubDomains
Content-Length: 14
Content-Type: text/plain; charset=UTF-8
Date: Tue, 14 Mar 2017 16:58:13 GMT
Server: nginx
}.
System.Net Information: 0 : [14844] ConnectStream#10589941::ConnectStream(Buffered 14 bytes.)
System.Net Information: 0 : [14844] Associating HttpWebRequest#49911653 with ConnectStream#10589941
System.Net Information: 0 : [14844] Associating HttpWebRequest#49911653 with HttpWebResponse#31534420
System.Net Verbose: 0 : [14844] Exiting HttpWebRequest#49911653::GetResponse() -> HttpWebResponse#31534420
System.Net Verbose: 0 : [14844] HttpWebResponse#31534420::GetResponseStream()
System.Net Information: 0 : [14844] ContentLength=14
System.Net Verbose: 0 : [14844] Exiting HttpWebResponse#31534420::GetResponseStream() -> ConnectStream#10589941
System.Net Verbose: 0 : [14844] ConnectStream#10589941::Read()
System.Net.Sockets Verbose: 0 : [14844] Socket#66337667::Dispose()
System.Net Verbose: 0 : [14844] Data from ConnectStream#10589941::Read
System.Net Verbose: 0 : [14844] 00000000 : 33 37 2E 31 38 37 2E 37-36 2E 31 34 34 0A : xxx.xxx.xxx.xxx
System.Net Verbose: 0 : [14844] Exiting ConnectStream#10589941::Read() -> Int32#14
System.Net Verbose: 0 : [14844] ConnectStream#10589941::Read()
System.Net Verbose: 0 : [14844] Exiting ConnectStream#10589941::Read() -> Int32#0
System.Net Verbose: 0 : [14844] ConnectStream#10589941::Close()
System.Net Verbose: 0 : [14844] Exiting ConnectStream#10589941::Close()
System.Net Verbose: 0 : [14844] ConnectStream#10589941::Close()
System.Net Verbose: 0 : [14844] Exiting ConnectStream#10589941::Close()
System.Net Verbose: 0 : [14844] Exiting WebClient#45410999::DownloadString() -> xxx.xxx.xxx.xxx

The thread 0x2b90 has exited with code 259 (0x103).
The thread 0x39fc has exited with code 259 (0x103).
The program ‘[15080] TraceTest.vshost.exe’ has exited with code 0 (0x0).

Categories: Uncategorized

Cloud Answering Machine.com – A #hosted, #virtual #answering machine service.

March 9, 2017 Leave a comment

CloudAnsweringMachine.com – is a hosted, virtual answering machine service, where you can create a new phone number that will handle your calls for you. You can select a phone number anywhere in the world, from a list of thousands, and then, any calls to this number will be recorded, and emailed to you.

You can also check your messages online, or via an API – an App is coming soon!

You can record your own greeting, and the number also handles inbound SMS messages also. – great if you want to create a second WhatsApp account.

Why have an online answering machine?, well, it’s designed for people who just don’t have the time to handle all the calls they get in one day. In this way, you can handle all your calls in your own time, rather than being interrupted every 5 minutes when you are trying to work.

It’s also useful if you are dealing with people that you may not fully trust, like on an online dating website – or perhaps if you have to provide a phone number to some service, but you don’t want to be bombarded with sales calls.

 

Categories: Uncategorized

Handling inbound voice calls & inbound #SMS with #Twilio

March 4, 2017 Leave a comment

twilio

For $1 a month, you can “buy” a phone number from twilio, and with that, you can intercept inbound SMS AND voice calls to that number. I’ve only started to experiment with this, but I set up a web hook and captured the Querystring to see what happens when you SMS the number, and when you call it.

These are the querystring variables (I’ve put XXXX on some sensitive data)

SMS:

?ToCountry=US
&ToState=FL
&SmsMessageSid=SM3cabdc50b56a945867a5ff92bd663797
&NumMedia=0
&ToCity=
&FromZip=
&SmsSid=SM3cabdc50b56a945867a5ff92bd663797
&FromState=
&SmsStatus=received
&FromCity=
&Body=Test+inbound+sms
&FromCountry=GB
&To=%2B123930xXXXX
&ToZip=
&NumSegments=1
&MessageSid=SM3cabdc50b56a945867a5ff92bd663797
&AccountSid=AC84d144631d43d12966be8c03e2c6a640
&From=%2B44786XXXXXXX
&ApiVersion=2010-04-01

VOICE:

?Called=%2B123XXXXXXX
&ToState=FL
&CallerCountry=GB
&Direction=inbound
&CallerState=
&ToZip=
&CallSid=CAd8a28a1a98844f1c38d8ea68ce2ef8f6
&To=%2B12393XXXXXX
&CallerZip=
&ToCountry=US
&ApiVersion=2010-04-01
&CalledZip=
&CalledCity=
&CallStatus=ringing
&From=%2B44786XXXXXX
&AccountSid=AC84d144631d43d12966be8c03e2c6a640
&CalledCountry=US
&CallerCity=
&Caller=%2B447866XXXXXX
&FromCountry=GB
&ToCity=
&FromCity=
&CalledState=FL
&FromZip=
&FromState=

Sending SMS via C# is easy done via their library, but If you want to use WebClient, or an older version of .NET, you can use a HTTP post as follows;

However, of course you’d always prefer to use www.freebiesms.co.uk ! 🙂

/*https://www.twilio.com/docs/api/rest/sending-messages*/
string strUrl = “https://api.twilio.com/2010-04-01/Accounts/&#8221; + username + “/Messages.json”;
string strPostdata = “To=” + HttpUtility.UrlEncode(“+” + To);
strPostdata += “&From=12XXXXXXXX”;
strPostdata += “&Body=” + ISOEncode(Message);
WebClient wc = new WebClient();
wc.Headers[“Content-Type”] = “application/x-www-form-urlencoded”;
string credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes(username + “:” + password));
wc.Headers[HttpRequestHeader.Authorization] = string.Format(
“Basic {0}”, credentials);
string strStatus = “”;
try
{
strStatus = wc.UploadString(strUrl, strPostdata);
}
catch (WebException ex)
{
strStatus = new StreamReader(ex.Response.GetResponseStream()).ReadToEnd();

Categories: Uncategorized

#Docmail #API part 2 #Custom #envelopes

March 3, 2017 Leave a comment

dmlogo_b

I wrote an earlier post on Docmail, where I demonstrated how to send physical mail via C#, one of the things I found, was that it sends a windowed envelope, and overlays the address on the first page of the document you want to send. If you’ve designed your document around this, it shouldn’t be a problem – and you can always add an extra blank page to the start of your PDF (at an extra cost), however, the correct solution, is to send a custom envelope, with the address on the outside.

    public class DocMailAddress
    {
        public string FirstName;
        public string Surname;
        public string Address1;
        public string Address2;
        public string Address3;
        public string Address4;
        public string FullName {
            get
            {
                return FirstName + " " + Surname;
            }
        }
    }

    public class DocMailHandler
    {

        static string sUsr = "username";

        static string sPwd = "password";

        static string sReturnMessageFormat = "Text";

        static string sAppName = "your app";
        static string sMailingName = "your app";

        static string sMailingDesc = "your app";
  

        static string sEmailOnError = "info@you.com";
        static string sEmailOnSuccess = "info@you.com";


        public static void SendFile(DocMailAddress Address, string PDF)
        {
            DMWS.DMWSSoapClient oService = new DMWS.DMWSSoapClient();
            Hashtable oResultHash = default(Hashtable);
            Guid gMailingGUID = default(Guid);
            Guid gTemplateGUID = default(Guid);
     
            // Create a mailing
            oResultHash = ResultHashTable(oService.CreateMailing(sUsr, sPwd, sAppName, "A4Letter", sMailingName, sMailingDesc, false, false, "StandardProofPerAddress", false,
            true, DateTime.Now, "", "Full Name", "", "CustomNoPanel", sReturnMessageFormat));
            CheckError(oResultHash);
            //get MailingGUID - required to continue the mailing
            gMailingGUID = GetResultGUID(oResultHash, "MailingGUID");

            // Add envelope
            oResultHash =
                ResultHashTable(oService.AddTemplateFromLibrary(sUsr, sPwd, gMailingGUID, "Outer envelope", 1,
                    sReturnMessageFormat));
            CheckError(oResultHash);

            // Add a template
            oResultHash = ResultHashTable(oService.AddTemplateFile(sUsr, sPwd, gMailingGUID, "Deemtree", "Deemtree", OpenFileAsByteArray(PDF), "A4Letter", true, "Arial 10", "",
            "", false, false, "", "", false, 1, 1, "", false,
            sReturnMessageFormat));
            CheckError(oResultHash);
            //get templateGUID  - can be passed in to other calls
            gTemplateGUID = GetResultGUID(oResultHash, "TemplateGUID");

           
            oResultHash = ResultHashTable(oService.AddAddress(sUsr, sPwd, gMailingGUID, Address.Address1, Address.Address2, Address.Address3, Address.Address4, "", "", true, "", Address.FirstName, Address.Surname, Address.FullName, "", "", "", "", "", "", "", "", "", "", "", 0, 0, 0, "", "", "", "", "", "", "", "", "", "", ""));
            CheckError(oResultHash);
           
            //The following code submits a mailing for processing, automatically approving the order (Submit=true, PartialProcess=false)
            oResultHash = ResultHashTable(oService.ProcessMailing(sUsr, sPwd, gMailingGUID, sAppName, true, false, 0, "", "Topup", true,
            sEmailOnError, sEmailOnSuccess, "", "", sReturnMessageFormat));
            CheckError(oResultHash);

            //The following code checks the status, looping until the proof is ready and then saves the proof file to disk
            do
            {
                oResultHash = ResultHashTable(oService.GetStatus(sUsr, sPwd, gMailingGUID, sReturnMessageFormat));
                CheckError(oResultHash);
                var strStatus = Convert.ToString(oResultHash["Status"]);
                bool blnDone = false;
                switch (strStatus)
                {
                    case "Error in processing":
                        blnDone = true;
                        // Error trapping code add here ...
                        break;
                    case "Mailing submitted":
                    case "Mailing processed":
                    case "Partial processing complete":
                        // You Save the proof to disk
                        blnDone = true;
                        break;
                }
                if (blnDone) break;
                System.Threading.Thread.Sleep(1000);
                // Wait one second between each poll
            } while (true);

        }

      
        #region "Support Functions"
        //The following function convertes a text result string into a hash table for easy access to the return data: 
        private static Hashtable ResultHashTable(string ResultData)
        {
            Hashtable oHashTable = new Hashtable();
            if (!string.IsNullOrEmpty(ResultData))
            {
                foreach (string sLine in ResultData.Split(new[] { '\n' }))
                {
                    if (!string.IsNullOrEmpty(sLine))
                    {
                        int iIndex = sLine.IndexOf(": ");
                        string sKey = sLine.Substring(0, iIndex);
                        string sData = sLine.Substring(iIndex + 2, sLine.Length - iIndex - 2);

                        oHashTable.Add(sKey, sData);
                    }
                }
            }
            return oHashTable;
        }

        private static void CheckError(Hashtable oResultHash)
        {
            if (oResultHash.ContainsKey("Error code"))
                throw new Exception(string.Format("Error {0}: {1} - {2}", oResultHash["Error code"], oResultHash["Error code string"], oResultHash["Error message"]));
        }

        private static Guid GetResultGUID(Hashtable oResultHash, string sField)
        {
            Guid functionReturnValue = default(Guid);
            functionReturnValue = new System.Guid(Convert.ToString(oResultHash[sField]));
            if (functionReturnValue == Guid.Empty)
                throw new Exception(sField + " Contained a blank or invalid GUID");
            return functionReturnValue;
        }

        //The following function opens a file as a byte array: 
        private static byte[] OpenFileAsByteArray(string FilePath)
        {
            System.IO.FileStream oFileStream = System.IO.File.OpenRead(FilePath);
            int iBytes = Convert.ToInt32(oFileStream.Length);
            byte[] oByteArray = new byte[iBytes];
            oFileStream.Read(oByteArray, 0, iBytes);
            oFileStream.Close();
            return oByteArray;
        }

        //The following sub routine saves a byte array to a file: 
        private static void SaveFromByteArray(byte[] FileData, string FilePath)
        {
            using (System.IO.FileStream oFileStream = new System.IO.FileStream(FilePath, System.IO.FileMode.Create))
            {
                oFileStream.Write(FileData, 0, FileData.Length);
                oFileStream.Close();
            }
        }

        #endregion
    }
Categories: Uncategorized