Skip to content

Instantly share code, notes, and snippets.

@bfocht
Created June 30, 2023 01:27
Show Gist options
  • Save bfocht/b935ce41b8688e93ac6aebb6b64c0871 to your computer and use it in GitHub Desktop.
Save bfocht/b935ce41b8688e93ac6aebb6b64c0871 to your computer and use it in GitHub Desktop.
X10 Registration Codes
if (httpRequest.Uri.AbsolutePath.Equals("/xregister.cgi"))
{
HTTPResponse.BodyData = "100: 127.0.0.1,127X0X0X1P0 registered successfully\n";
}
if (httpRequest.Uri.AbsolutePath.Equals("/cgi-bin/checkfornewrelease.cgi"))
{
//respMess = "<html>\n<head>\n<title>.</title>\n<meta http-equiv=\"Cache-Control\" content=\"no-cache\">\n</head>\n<body>\n<a href=\"http://www.x10.com/\">Click here</a> to continue.\n</body>\n</html>";
HTTPResponse.BodyData = "<xml>\n";
HTTPResponse.BodyData += "<activehomepro>\n";
HTTPResponse.BodyData += "<version>\"3.228\"</version>\n";
HTTPResponse.BodyData += "<update>\"1\"</update>\n";
HTTPResponse.BodyData += "<location>\"http://xlola:[email protected]/ahp/ahp_updt.exe\"</location>\n";
HTTPResponse.BodyData += "</activehomepro>\n";
HTTPResponse.BodyData += "</xml>\n";
HTTPResponse.status = 302;
//SendHeader(respMess.Length, ref tcpClient, "302 Moved Temporarily", "text/html");
//SendToBrowser(respMess, ref tcpClient);
//tcpClient.Close();
//return;
}
if (httpRequest.Uri.AbsolutePath.Equals("/softwarereg.cgi") && httpRequest.QueryString.Exists("ProductID"))
{
if (httpRequest.QueryString["ProductID"].Equals("000F00010320201F"))
{
HTTPResponse.BodyData = "<X10Register>\n";
HTTPResponse.BodyData += "<RegRequest ver=\"1\" success=\"1\">\n";
HTTPResponse.BodyData += "<FailureReason val=\"\"/>\n";
HTTPResponse.BodyData += "<ActivationKey len=\"40\" val=\"DCE4579B92F00959A847F1F4D904F4B53C79F599\"/>\n";
HTTPResponse.BodyData += "<RegistrationKey len=\"40\" val=\"C1E0B7C2C2E8DD1A632095805DA40EECDD9F753F\"/>\n";
HTTPResponse.BodyData += "<CheckKey len=\"40\" val=\"0F1B89333757A62F4FE31D8E8962EF1D1D3F442C\"/>\n";
HTTPResponse.BodyData += "<UserKey len=\"40\" val=\"E91FBBA50DD81C765B3FEECA8FD71E2FBB13584C\"/>\n";
HTTPResponse.BodyData += "<UserName len=\"11\" val=\"Registered\"/>\n";
HTTPResponse.BodyData += "<ProductID val=\"0x000F00010320201F\"/>\n";
HTTPResponse.BodyData += "<CurrentTime val=\"129560429700000000\"/>\n";
HTTPResponse.BodyData += "<ValidStart val=\"0\"/>\n";
HTTPResponse.BodyData += "<ValidEnd val=\"0x7FFFFFFFFFFFFFFF\"/>\n";
HTTPResponse.BodyData += "</RegRequest>\n";
HTTPResponse.BodyData += "</X10Register>\n";
}
//security module
if (httpRequest.QueryString["ProductID"].Equals(("001B00010320201F")))
{
HTTPResponse.BodyData = "<X10Register>\n";
HTTPResponse.BodyData += "<RegRequest ver=\"1\" success=\"1\">\n";
HTTPResponse.BodyData += "<FailureReason val=\"\"/>\n";
HTTPResponse.BodyData += "<ActivationKey len=\"40\" val=\"F4634F52A37D5BDD23DC7D266B0E91E956199181\"/>\n";
HTTPResponse.BodyData += "<RegistrationKey len=\"40\" val=\"52312F83FA42FD16AF5C8C3059F1CC600053F405\"/>\n";
HTTPResponse.BodyData += "<CheckKey len=\"40\" val=\"547B330AD0B67A66398262CFC50025F70620296D\"/>\n";
HTTPResponse.BodyData += "<UserKey len=\"40\" val=\"16AC68B936E67104FDDA8F527CB8CC53D7767CAC\"/>\n";
HTTPResponse.BodyData += "<UserName len=\"11\" val=\"Registered\"/>\n";
HTTPResponse.BodyData += "<ProductID val=\"0x001B00010320201F\"/>\n";
HTTPResponse.BodyData += "<CurrentTime val=\"129560446180000000\"/>\n";
HTTPResponse.BodyData += "<ValidStart val=\"0\"/>\n";
HTTPResponse.BodyData += "<ValidEnd val=\"0x7FFFFFFFFFFFFFFF\"/>\n";
HTTPResponse.BodyData += "</RegRequest>\n";
HTTPResponse.BodyData += "</X10Register>\n";
}
//active phone
if (httpRequest.QueryString["ProductID"].Equals(("001700010320201F")))
{
HTTPResponse.BodyData = "<X10Register>\n";
HTTPResponse.BodyData += "<RegRequest ver=\"1\" success=\"1\">\n";
HTTPResponse.BodyData += "<FailureReason val=\"\"/>\n";
HTTPResponse.BodyData += "<ActivationKey len=\"40\" val=\"9871EF69110EDD4DAAE77CA24BF90795EC289067\"/>\n";
HTTPResponse.BodyData += "<RegistrationKey len=\"40\" val=\"BBBB42E0A2F5A9F6E6434D841C05EB59090BDBC2\"/>\n";
HTTPResponse.BodyData += "<CheckKey len=\"40\" val=\"26E72ABD46D12ACD4385E4E2709E35E87049ECF8\"/>\n";
HTTPResponse.BodyData += "<UserKey len=\"40\" val=\"202DFE955E5E712E3608CB06E4F208B67111D3F4\"/>\n";
HTTPResponse.BodyData += "<UserName len=\"11\" val=\"Registered\"/>\n";
HTTPResponse.BodyData += "<ProductID val=\"0x001700010320201F\"/>\n";
HTTPResponse.BodyData += "<CurrentTime val=\"129560471420000000\"/>\n";
HTTPResponse.BodyData += "<ValidStart val=\"0\"/>\n";
HTTPResponse.BodyData += "<ValidEnd val=\"0x7FFFFFFFFFFFFFFF\"/>\n";
HTTPResponse.BodyData += "</RegRequest>\n";
HTTPResponse.BodyData += "</X10Register>\n";
}
//smart macro
if (httpRequest.QueryString["ProductID"].Equals(("001400010320201F")))
{
HTTPResponse.BodyData = "<X10Register>\n";
HTTPResponse.BodyData += "<RegRequest ver=\"1\" success=\"1\">\n";
HTTPResponse.BodyData += "<FailureReason val=\"\"/>\n";
HTTPResponse.BodyData += "<ActivationKey len=\"40\" val=\"05931479C8B77DC3688B17D0E626B7AADB74B647\"/>\n";
HTTPResponse.BodyData += "<RegistrationKey len=\"40\" val=\"AFA7039B95D0A37C05C31172C206148C13D3B3E3\"/>\n";
HTTPResponse.BodyData += "<CheckKey len=\"40\" val=\"47DBED6B8ECB82C020F39B0886B933F6A6D7FFE8\"/>\n";
HTTPResponse.BodyData += "<UserKey len=\"40\" val=\"D7ADA9294A5C1EFEF44D783B00311415505B6869\"/>\n";
HTTPResponse.BodyData += "<UserName len=\"11\" val=\"Registered\"/>\n";
HTTPResponse.BodyData += "<ProductID val=\"0x001400010320201F\"/>\n";
HTTPResponse.BodyData += "<CurrentTime val=\"129560471420000000\"/>\n";
HTTPResponse.BodyData += "<ValidStart val=\"0\"/>\n";
HTTPResponse.BodyData += "<ValidEnd val=\"0x7FFFFFFFFFFFFFFF\"/>\n";
HTTPResponse.BodyData += "</RegRequest>\n";
HTTPResponse.BodyData += "</X10Register>\n";
}
//Active Home Pro Network
if (httpRequest.QueryString["ProductID"].Equals(("001600010320201F")))
{
HTTPResponse.BodyData = "<X10Register>\n";
HTTPResponse.BodyData += "<RegRequest ver=\"1\" success=\"1\">\n";
HTTPResponse.BodyData += "<FailureReason val=\"\"/>\n";
HTTPResponse.BodyData += "<ActivationKey len=\"40\" val=\"75791ACE40FDD8ED931A59DD07050C89AD0B307D\"/>\n";
HTTPResponse.BodyData += "<RegistrationKey len=\"40\" val=\"15BC92740333006C8327B674F5D879701C70AFAE\"/>\n";
HTTPResponse.BodyData += "<CheckKey len=\"40\" val=\"90E5231877A7FDE0F56B2AAD9119ED0F1C43B51A\"/>\n";
HTTPResponse.BodyData += "<UserKey len=\"40\" val=\"A8FC0073DC1347DF588981D1F253E5CCDF730F17\"/>\n";
HTTPResponse.BodyData += "<UserName len=\"11\" val=\"Registered\"/>\n";
HTTPResponse.BodyData += "<ProductID val=\"0x001600010320201F\"/>\n";
HTTPResponse.BodyData += "<CurrentTime val=\"129561318090000000\"/>\n";
HTTPResponse.BodyData += "<ValidStart val=\"0\"/>\n";
HTTPResponse.BodyData += "<ValidEnd val=\"0x7FFFFFFFFFFFFFFF\"/>\n";
HTTPResponse.BodyData += "</RegRequest>\n";
HTTPResponse.BodyData += "</X10Register>\n";
}
//ActiveHome Video
if (httpRequest.QueryString["ProductID"].Equals(("001500010320201F")))
{
//GET /softwarereg.cgi?OrderID=Registration attempt failed!&ProductID=002200010320201F&SystemKey=1E3F6ABF201AEB09D38F1183C8CC3CF744B14859 HTTP/1.
HTTPResponse.BodyData = "<X10Register>\n";
HTTPResponse.BodyData += "<RegRequest ver=\"1\" success=\"1\">\n";
HTTPResponse.BodyData += "<FailureReason val=\"\"/>\n";
HTTPResponse.BodyData += "<ActivationKey len=\"40\" val=\"EDCA50DA090F8444815B3AEB9DA6D3FB5B44A6CC\"/>\n";
HTTPResponse.BodyData += "<RegistrationKey len=\"40\" val=\"C27138677E35EF7CB51BE11A86671170C87AA076\"/>\n";
HTTPResponse.BodyData += "<CheckKey len=\"40\" val=\"6B365AC4B8CE24EF0C72DAEE84B10EBB515D762F\"/>\n";
HTTPResponse.BodyData += "<UserKey len=\"40\" val=\"CA94A7F35C64126FFE2B06AF59ECB680BE037982\"/>\n";
HTTPResponse.BodyData += "<UserName len=\"11\" val=\"Registered\"/>\n";
HTTPResponse.BodyData += "<ProductID val=\"0x001500010320201F\"/>\n";
HTTPResponse.BodyData += "<CurrentTime val=\"129755627800000000\"/>\n";
HTTPResponse.BodyData += "<ValidStart val=\"0\"/>\n";
HTTPResponse.BodyData += "<ValidEnd val=\"0x7FFFFFFFFFFFFFFF\"/>\n";
HTTPResponse.BodyData += "</RegRequest>\n";
HTTPResponse.BodyData += "</X10Register>\n";
}
}
if (httpRequest.Uri.AbsolutePath.Equals("/log.htm"))
{
HTTPResponse.BodyData = WebServer.GenerateX10Log("test log");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment