Hack Forums
[C#] Create Netseal License - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C#] Create Netseal License (/showthread.php?tid=4715014)



Create Netseal License - coolerfarmer - Mar 4, 2015

hey, just want to share this little code piece. You can create licenses for your netseal application in c# with it:

PHP Code

<?php 
using 
(WebClient wc = new WebClient())
{
NameValueCollection nv = new NameValueCollection();
nv.Add("key", "YOURAPIKEY");
nv.Add("track", "");
nv.Add("type", "1");  //free=0, bronze=1, silver=2, gold=3, platin=4, dia=5
nv.Add("points", "");
nv.Add("time", "0"); //unlimited = 0
var responseBytes = wc.UploadValues("http://seal.nimoru.com/Remote/createCode3.php", nv);
var 
serial = Encoding.ASCII.GetString(responseBytes ).Substring(1);
} 



* - SIM-1676753 - Mar 4, 2015

Isn't there a licence panel for Net Seal? I can see uses for this for web applications though.


* - Only3 - Mar 4, 2015

(Mar 4, 2015 03:53 PM)Mr. Trvp Wrote:  Isn't there a licence panel for Net Seal? I can see uses for this for web applications though.

"You can create licenses for your netseal application"


* - Corios - Mar 4, 2015

Just to nitpick, use HttpClient instead of WebClient, and Dictionary<string, string> instead of NVC since you won't have repeats, otherwise mind explaining what this does a little more? I thought this was built into the panel.


* - coolerfarmer - Mar 4, 2015

(Mar 4, 2015 06:14 PM)Corios Wrote:  Just to nitpick, use HttpClient instead of WebClient, and Dictionary<string, string> instead of NVC since you won't have repeats, otherwise mind explaining what this does a little more? I thought this was built into the panel.

It is, but you can integrate this into your applications. E.g. I need this to automatically transfer the licenses of my old customers to the new version.


* - Corios - Mar 4, 2015

(Mar 4, 2015 11:02 PM)coolerfarmer Wrote:  It is, but you can integrate this into your applications. E.g. I need this to automatically transfer the licenses of my old customers to the new version.

ah okay, I can see that being pretty useful then, thanks for the snippet!