Posts: 5
	Threads: 2
	Joined: Jul 2015
	
Reputation: 
1
	 
	
	
		I'm trying to make a program to convert hexadecimal certificates to Haxorware, But some values are not converted properly.
I think that the certificates are in ascii hexadecimal.
i am using vb.net to make the program.
Thank you.
	
	
	
	
	
 
 
	
	
	
		
	Posts: 8
	Threads: 1
	Joined: Aug 2016
	
Reputation: 
3
	 
	
		
		
		21-08-2016, 05:14 PM 
(This post was last modified: 21-08-2016, 05:14 PM by FallGuy.)
	
	 
	
		Hi, for my knowledge the encoding for the CM Certificate is DER.  
For instance you have the big hexdump from a CM Certificate you can use this steps under Linux.
1. Put the hexdump into a textfile with the name cm_cert_hex.txt
2. use this command
    cat cm_cert_hex.txt | sed 's/\ //g' | tr -d "\n"
3. then copy the output
4. command
   touch cm_cert.der
5. open the cm_cert.der with the linux tool hexedit
6. paste the copied input from step 3 into the hexedit editor and save with F2 and then Ctrl-C
7. take a look at your CM Certificate with OpenSSL
   openssl x509 -inform DER -in cm_cert.der -text -noout
But you should keep in mind, that you need also the right private.key from the particular CM certificate.
One thing what I found out the CM Certificates from Intel based cable modem are not really usable at Haxorware because they are to big.
For that reason I just use cable modem with Puma5/6 where the console access is open.
	
	
	
	
	
 
 
	
	
	
		
	Posts: 5
	Threads: 2
	Joined: Jul 2015
	
Reputation: 
1
	 
	
	
		I found the exact encoding for the haxorware certificates.
It is ISO 8859-1 Latin 1; Western European (ISO).
To convert the hexadecimal to ansi string i use a function in vb.net.
    Public Function HexToStr(ByVal Data As String) As String
        Dim com As String = ""
        For x = 0 To Data.Length - 1 Step 2
            com &= ChrW(CInt("&H" & Data.Substring(x, 2)))
        Next
        Return com
    End Function
Then i use the next instruction to encoding:
Dim sw As New System.IO.StreamWriter(fic, False, System.Text.Encoding.GetEncoding(28591))
fic is the directory + file name.
I hope its clear.
	
	
	
	
	
 
 
	
	
	
		
	Posts: 2
	Threads: 0
	Joined: Oct 2016
	
Reputation: 
0
	 
	
	
		Thanks for sharing this useful post..