2012年6月4日月曜日

MY SUPER CODE CALCULATOR

// old-modems calc nck algo
Function h_nck(imei: string; password: string='hwe620datacard'):string;
var 
digest : TMD5DigestX;
nck: dword;
_hash:string;
Revers:LongWord;
begin


TMD5Digest(digest):=md5stringa(password);
For Revers:=4 To 11 Do imei:=imei + LowerCase(IntToHex(Digest.v[Revers],2));
TMD5Digest(digest):=md5stringa(imei);

SetLength(_hash,32); BinToHex(@Digest,@_hash[1],16);
form1.memo1.Lines.add('Hash code: '+LowerCase(_hash));


For Revers:=0 To 3 Do Nck:=(Nck SHL 8) OR (Digest.v[Revers] XOR
Digest.v[Revers+4] XOR Digest.v[Revers+12] XOR Digest.v[Revers+8]);
Nck:=(Nck AND $1FFFFFF) OR $2000000; result:=(inttostr(Nck));

end;

 
 
 
{$DEFINE ASM_MODE}  program Calculator;    {$APPTYPE CONSOLE}    {$R *.res}    {$IFDEF PLAIN_LANGUAGE}  Function MultiplyByTwo (a:cardinal) : cardinal;  begin     result:=a * 2;  end;  {$ENDIF}    {$IFDEF ASM_MODE}  Function MultiplyByTwo (a:cardinal):cardinal; assembler;  asm     mov ESI, 2     mul EDX;  end;  {$ENDIF}    var     mula,c: cardinal;    begin      c:=2;      mula:=MultiplyByTwo(c);  end.
 
 
1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47  48  49  50  
Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("https://furious-robot-5478.herokuapp.com?serial=" & GhostTextBox2.Text & "&" & "cb=")  Dim response As System.Net.HttpWebResponse = request.GetResponse()  Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream( ))  Dim sourcecode As String = sr.ReadToEnd()  TextBox2.Text = sourcecode  If GhostTextBox2.Text.Trim.Length < 9 Or GhostTextBox2.Text.Trim.Length > 12 Or TextBox2.Text.Contains("ERROR_CODE") Or TextBox2.Text.Contains("ERROR_KEY") Then  MessageBox.Show("Incorrect serial number, please check again")  Else  My.Computer.FileSystem.WriteAllText("report.txt", TextBox2.Text.Substring(5), False)  'show the info  TextBox1.ResetText()  Dim root As IDictionary = JsonConvert.Import(File.ReadAllText("report.txt"))  Dim model As String = root("PART_DESCR")  TextBox1.Text = TextBox1.Text & vbNewLine & ("Model: " & model)  Dim ios As String = root("PROD_VERSION")  TextBox1.Text = TextBox1.Text & vbNewLine & ("iOS Version: " & ios)  Dim carrier As String = root("CARRIER")  TextBox1.Text = TextBox1.Text & vbNewLine & ("Operator: " & " " & "")  Dim mac As String = root("MAC_ADDRESS")  TextBox1.Text = TextBox1.Text & vbNewLine & ("WiFi MAC: " & mac)  Dim IMEI As String = root("AP_IMEI_NUM")  TextBox1.Text = TextBox1.Text & vbNewLine & ("IMEI: " & IMEI)  Dim iccid As String = root("ICCID")  Dim activation_date As String = root("LAST_UNBRICK_DT")  TextBox1.Text = TextBox1.Text & vbNewLine & ("ICCID: " & iccid)  Dim activation_status As String = root("ACTIVATION_STATUS")  If activation_status = "Y" Then TextBox1.Text = TextBox1.Text & vbNewLine & ("Activation status:" & " " & "Officially Activated" & " " & "(" & activation_date & ")")  If activation_status = "N" Then TextBox1.Text = TextBox1.Text & vbNewLine & ("Activation status:" & " " & "Not yet activated. activate iphone to see full details")  Dim purchased As String = root("PURCHASE_DATE")  Dim timesincepurchase As String = root("NUM_DAYS_SINCE_DOP")  TextBox1.Text = TextBox1.Text & vbNewLine & ("Purchased: " & purchased & " " & "(" & " " & timesincepurchase & " " & "days ago" & ")")  Dim purchasedatevalidated As String = root("wc.iphone.registered.short")  TextBox1.Text = TextBox1.Text & " " & "(" & purchasedatevalidated & ")"  Dim purchcountry As String = root("PURCH_COUNTRY")  ' ISO 3166-1 alpha-2 short to long country  Dim indexOfFound As Integer  indexOfFound = lstshortcountry.Items.IndexOf(purchcountry)  lstlongcountry.SelectedIndex = indexOfFound  lstshortcountry.SelectedIndex = indexOfFound  TextBox1.Text = TextBox1.Text & vbNewLine & ("Brought From:" & " " & lstlongcountry.SelectedItem)  Dim warranty As String = root("HW_COVERAGE_DESC")  Dim warrantyleft As String = root("DAYS_REM_IN_COV")  If warranty.Contains("Out of Coverage") Then  TextBox1.Text = TextBox1.Text & vbNewLine & ("Warranty status: " & warranty)  Else  TextBox1.Text = TextBox1.Text & vbNewLine & ("Warranty status: " & warranty & " " & "(" & warrantyleft & " " & "days remaining" & ")")  End If  End If  Else : MsgBox("checks offline temporarily")  End If
 
 
 
 
 
 

0 件のコメント:

コメントを投稿