bobsmith161
02-08-2006, 04:19 AM
i used a ISO to un lock a rom 10 @reva23 with this that way you only need the iso to get started
just past into winexplorer V5.0 and run it:):)free for you free for me:):)
:::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::: :::
' New VB Script File - Created 10/27/04
' FOR Dish rom 10 A23 rev STREAMLOCKED only.
'************************************************* *************************************
' A23U_WInex Unlocker
' Special credits go for..
' No1b4me, Penga....
' Tnx also for AGNX Group and their members...
' IvanX, WilsonRCA, AlexIS...
' Cardcoders Staff and members...
' As always use this script at your own risk
'
' Anarky
'
'************************************************* *************************************
'
Option Explicit
Dim Bytes
dim bytes2
Dim BR2(5)
Dim VCCStart
Dim VCCLimit
Dim VCC
Dim DelayEnd
Dim DelayStart
Dim GlitchType
Dim TryCnt
DIM TryLimit
DIM TRYCNT2
DIM RT
DIM TestMode
Dim ScriptStart
Dim ScriptEnd
Dim TempScriptStart
Dim TimeInMinutes
Dim TimeInHours
Dim TimeElapsed
Dim RunTime
Dim ATR
Dim MenuPrompt
Dim SWChoice
Dim RChoice
Dim FIXChoice
Dim RWChoice
Dim ErrorString
Dim DChoice
Dim EChoice
Dim Choice
Dim PromptString
Dim RetValue
Dim GotInput
Dim ThisChar
Dim Version
Dim Password
Dim Cchoice
TRYCNT2=1
' These are the variables you can change for rom 10 dish A23
VCCStart = &h36 'YOU CAN CHANGE THIS FROM 18-30
VCCLimit = &h13 'YOU CAN CHANGE THIS FROM 10-20
DelayStart=&h123E 'DISH A23 is 123E- could be as low as 1100
DelayEnd = &H125A 'DISH A23 IS 125A- could be as high as 127A
TryCnt = 300 'Number of tries per delay FROM 5-50000
TestMode = 0 'TestMode, 1 = ON, 0 = OFF
'TestMode is used to find a glitch point on A81 cam. once you find the
'delay and vcc settings on cam then set TestMode = 0, and open the cam.
' end of variables
Sub Main()
If Sc.Version < 4.6 Then
ErrorString = "You need version 4.5 or greater of WinExplorer to run this script"
Sc.MsgBox ErrorString, vbCritical
Err.Raise 1050, , ErrorString
End If
call SetupUnlocker
if ReceiveATR() > 0 Then
'MenuPrompt = "ATR : " & ATR
Call Sc.Msgbox ("ATR: " & ATR, VbInformation, "Good ATR detected , Script will continue.. Click *Ok* button..")
sc.print "ATR : " & ATR & VbCrLF
else
Call OopsNoATR()
End if
Do
menuprompt=""
MenuPrompt = MenuPrompt & "1. Default Script" & vbCrLf
MenuPrompt = MenuPrompt & "2. Mod Script, Fixed VCC " & vbCrLf
MenuPrompt = MenuPrompt & "3. Mod Script, Random Delays" & vbCrLf
MenuPrompt = MenuPrompt & "4. Mod Script, Random VCC and Delays" & vbCrLf
RWChoice = Sc.ButtonBox(MenuPrompt, VbInformation, "A23U_Winex: Select operation or click X to Exit------------>", "Default", "Fixed VCC", "RND Delay", "RND VCC/DLY")
Select Case RWChoice
Case "0"
Exit Sub
''''''''''''''''''''''''''''''''''''''''''''
Case "1"
call Default1
Case "2"
call Defaultmod1
Case "3"
call Defaultmod2
Case "4"
call Defaultmod3
End Select
Loop While True = True
End Sub ' End Sub Main()
Sub Default1()
ScriptStart = Now
TimeElapsed = 0
TimeInMinutes = 0
TimeInHours = 0
VCC = VCCStart
RT = DelayStart
sc.verbose=TRUE
Sc.Write("12 15 AB 21 00 08 A0 CA 00 00 02 12 00 06 55 0E 03 85 00")
Sc.Read(02)
Bytes = Sc.Getbyte(1)
if Bytes > 5 then
Sc.Read(6)
end if
print
if TestMode = 1 then
print " You are in testmode, cam will not open in this mode!!!" & vbcr
print " set TestMode = 0 to open cam " & vbcr & vbcr
end if
sc.verbose=false
Do
VCC = VCC - &h1
if VCC < VCCLimit then
VCC = VCCStart
END IF
Sc.Write("B0" & HexString(VCC, 2))
SC.DELAY(11)
Sc.Write("61 15 F6 21 00")
Sc.Write("53 A0 CA 00 00 4D 03 4B 00 C5 10 6F 15 CC 00 CC")
Sc.Write("00 CC 00 CC 00 0C CD 32 0C 5A EA 2D 2D 0C CD 32")
Sc.Write("0C 5A EA 2D 2D B1 C4 45 F4 E1 20 14 80 8D 4C F0")
Sc.Write("AA A6 1D 0D AA 1D F4 97 65 2E 88 4E 25 0C CD 32")
Sc.Write("0C 5A EA 2D 2D B1 C4 45 F4 E1 20 14 80 05 67 21")
Sc.Write("92 00 00 00 7D 20" & HexString(RT, 4) & "09 0E 05 85 00")
Sc.Read(02)
Bytes = Sc.Getbyte(1)
if Bytes > 4 then
Sc.Read(5)
bytes=sc.getbyte(3)
call progupdate(trycnt2 , RT, VCC, bytes)
TryCnt2 = TryCnt2 + 1
if trycnt2 > trycnt then
RT = RT + 1
TRYCNT2 = 0
if rt > DelayEnd then
rt = DelayStart
END IF
END IF
if bytes = &H83 then
print
print
print "*********** Glitch Successfull *************"& VbCr
PRINT "Answer= " & HEXSTRING(SC.GETBYTE(0),2) & HEXSTRING(SC.GETBYTE(1),2) & HEXSTRING(SC.GETBYTE(2),2) & HEXSTRING(SC.GETBYTE(3),2)& HEXSTRING(SC.GETBYTE(4),2)& VbCr
Sc.Print "********************************************" & VbCr
PRINT HexString(bytes, 2)
print " was hit at " & HexString(RT, 4) & " delay ----VCC WAS " & HexString(VCC, 2)& vbcr
Sc.Print "********************************************" & VbCr
SC.DELAY(2500)
Call Sc.ProgressBox ("", 0, 0, "")
sc.print "Elapsed Time: " + FormatNumber((CDbl(Now) - CDbl(ScriptStart)) * 24 * 60, 2, True, True, True) + " minutes" & vbcr
if TestMode = 0 then
sc.verbose=TRUE
Sc.Write("0A 15 A3 21 92 00 B3 0E 03 85 00")
SC.READ(2)
Bytes = Sc.Getbyte(1)
if Bytes > 4 then
Sc.Read(5)
bytes=sc.getbyte(3)
END IF
SC.DELAY(30)
PRINT "***************************" & VBCR
PRINT "* A23 CAM should be OPEN *" & VBCR
PRINT "* test in Nagra to see. *" & VBCR
PRINT "* if not, try again. *" & VBCR
PRINT "***************************" & VBCR
exit sub
end if
sc.verbose=false
end if
else
PRINT " RESET "
Card_reset
GetAtr
End if
Sc.Write("08 0e 03 10 01 01 03 9a 00") 'reset card
sc.read(02)
sc.delay(5)
LOOP
End Sub
'************************************************* ********
Sub DefaultMod1()
ScriptStart = Now
TimeElapsed = 0
TimeInMinutes = 0
TimeInHours = 0
VCC = VCCStart
RT = DelayStart
sc.verbose=TRUE
trycnt2=60
Sc.Write("12 15 AB 21 00 08 A0 CA 00 00 02 12 00 06 55 0E 03 85 00")
Sc.Read(02)
Bytes = Sc.Getbyte(1)
if Bytes > 5 then
Sc.Read(6)
end if
print
if TestMode = 1 then
print " You are in testmode, cam will not open in this mode!!!" & vbcr
print " set TestMode = 0 to open cam " & vbcr & vbcr
end if
sc.verbose=false
Do
Sc.Write("B0" & HexString(VCC, 2))
SC.DELAY(11)
Sc.Write("61 15 F6 21 00")
Sc.Write("53 A0 CA 00 00 4D 03 4B 00 C5 10 6F 15 CC 00 CC")
Sc.Write("00 CC 00 CC 00 0C CD 32 0C 5A EA 2D 2D 0C CD 32")
Sc.Write("0C 5A EA 2D 2D B1 C4 45 F4 E1 20 14 80 8D 4C F0")
Sc.Write("AA A6 1D 0D AA 1D F4 97 65 2E 88 4E 25 0C CD 32")
Sc.Write("0C 5A EA 2D 2D B1 C4 45 F4 E1 20 14 80 05 67 21")
Sc.Write("92 00 00 00 7D 20" & HexString(RT, 4) & "09 0E 05 85 00")
Sc.Read(02)
Bytes = Sc.Getbyte(1)
if Bytes > 4 then
Sc.Read(5)
bytes=sc.getbyte(3)
call progupdate(trycnt2 , RT, VCC, bytes)
TryCnt2 = TryCnt2 + 1
if trycnt2 > trycnt then
RT = RT + 1
TRYCNT2 = 0
if rt > DelayEnd then
rt = DelayStart
END IF
END IF
if bytes = &H83 then
print
print
print "*********** Glitch Successfull *************"& VbCr
PRINT "Answer= " & HEXSTRING(SC.GETBYTE(0),2) & HEXSTRING(SC.GETBYTE(1),2) & HEXSTRING(SC.GETBYTE(2),2) & HEXSTRING(SC.GETBYTE(3),2)& HEXSTRING(SC.GETBYTE(4),2)& VbCr
Sc.Print "********************************************" & VbCr
PRINT HexString(bytes, 2)
print " was hit at " & HexString(RT, 4) & " delay ----VCC WAS " & HexString(VCC, 2)& vbcr
Sc.Print "********************************************" & VbCr
print
SC.DELAY(2500)
Call Sc.ProgressBox ("", 0, 0, "")
sc.print "Elapsed Time: " + FormatNumber((CDbl(Now) - CDbl(ScriptStart)) * 24 * 60, 2, True, True, True) + " minutes" & vbcr
if TestMode = 0 then
sc.verbose=TRUE
Sc.Write("0A 15 A3 21 92 00 B3 0E 03 85 00")
SC.READ(2)
Bytes = Sc.Getbyte(1)
if Bytes > 4 then
Sc.Read(5)
bytes=sc.getbyte(3)
END IF
SC.DELAY(30)
PRINT "***************************" & VBCR
PRINT "* A23 CAM should be OPEN *" & VBCR
PRINT "* test in Nagra to see. *" & VBCR
PRINT "* if not, try again. *" & VBCR
PRINT "***************************" & VBCR
exit sub
end if
sc.verbose=false
end if
else
PRINT " RESET "
Card_reset
GetAtr
End if
Sc.Write("08 0e 03 10 01 01 03 9a 00") 'reset card
sc.read(02)
sc.delay(5)
LOOP
End Sub
'************************************************* ********
'************************************************* ********
Sub ProgUpdate(CnTv,DlYv,VCCv,ByteSv)
Dim mtries
Dim i
Dim Msg
Call FormatTime
Msg="Sending glitches to card with the following information: " & vblf & "Delay= " & hexstring(RT,4) & " VCC= " & hexstring(vcc,2) & " Response= "& hexstring(BytesV,2) & vblf & "Elapsed Time: " + FormatNumber((CDbl(Now) - CDbl(ScriptStart)) * 24 * 60, 2, True, True, True) + " minutes"
Call Sc.ProgressBox(Msg,CnTv,350,"A23U_Winex: " & "Glitch # " & CnTv )
End Sub
'************************************************* ********
Function FormatTime
TimeElapsed = FormatNumber((CDbl(Now) - CDbl(TempScriptStart)) * 24 * 60 * 60, 0, True, True, True)
If TimeElapsed > 59 then
TempScriptStart = Now
TimeInMinutes = TimeInMinutes + 1
TimeElapsed = 0
End If
If TimeInMinutes > 59 then
TempScriptStart = Now
TimeInHours = TimeInHours + 1
TimeElapsed = 0
TimeInMinutes = 0
End If
If TimeInHours > 0 then
If TimeElapsed < 10 then
If TimeInMinutes < 10 then
RunTime="" & TimeInHours & ":0" & TimeInMinutes & ":0" & TimeElapsed
Else
RunTime="" & TimeInHours & ":" & TimeInMinutes & ":0" & TimeElapsed
End If
else
If TimeInMinutes < 10 then
RunTime="" & TimeInHours & ":0" & TimeInMinutes & ":" & TimeElapsed
Else
RunTime="" & TimeInHours & ":" & TimeInMinutes & ":" & TimeElapsed
End If
End If
else
If TimeElapsed < 10 then
If TimeInMinutes > 0 then
RunTime="" & TimeInMinutes & ":" & "0" & TimeElapsed
Else
RunTime="" & ":" & "0" & TimeElapsed
End If
Else
If TimeInMinutes > 0 then
RunTime="" & TimeInMinutes & ":" & TimeElapsed
Else
RunTime="" & ":" & TimeElapsed
End If
End If
End If
End Function
'************************************************* ********
'************************************************* ********
Sub DefaultMod2()
ScriptStart = Now
TimeElapsed = 0
TimeInMinutes = 0
TimeInHours = 0
VCC = VCCStart
RT = DelayStart
sc.verbose=TRUE
Sc.Write("12 15 AB 21 00 08 A0 CA 00 00 02 12 00 06 55 0E 03 85 00")
Sc.Read(02)
Bytes = Sc.Getbyte(1)
if Bytes > 5 then
Sc.Read(6)
end if
print
if TestMode = 1 then
print " You are in testmode, cam will not open in this mode!!!" & vbcr
print " set TestMode = 0 to open cam " & vbcr & vbcr
end if
sc.verbose=false
Do
RT=INT(RND * (DelayEnd-DelayStart)) + DelayStart
Sc.Write("B0" & HexString(VCC, 2))
SC.DELAY(11)
Sc.Write("61 15 F6 21 00")
Sc.Write("53 A0 CA 00 00 4D 03 4B 00 C5 10 6F 15 CC 00 CC")
Sc.Write("00 CC 00 CC 00 0C CD 32 0C 5A EA 2D 2D 0C CD 32")
Sc.Write("0C 5A EA 2D 2D B1 C4 45 F4 E1 20 14 80 8D 4C F0")
Sc.Write("AA A6 1D 0D AA 1D F4 97 65 2E 88 4E 25 0C CD 32")
Sc.Write("0C 5A EA 2D 2D B1 C4 45 F4 E1 20 14 80 05 67 21")
Sc.Write("92 00 00 00 7D 20" & HexString(RT, 4) & "09 0E 05 85 00")
Sc.Read(02)
Bytes = Sc.Getbyte(1)
if Bytes > 4 then
Sc.Read(5)
bytes=sc.getbyte(3)
call progupdate(trycnt2 , RT, VCC, bytes)
TryCnt2 = TryCnt2 + 1
if trycnt2 > trycnt then
' RT = RT + 1
TRYCNT2 = 0
VCC = VCC - &h1
if VCC < VCCLimit then
VCC = VCCStart
END IF
END IF
if bytes = &H83 then
print
print
print "*********** Glitch Successfull *************"& VbCr
PRINT "Answer= " & HEXSTRING(SC.GETBYTE(0),2) & HEXSTRING(SC.GETBYTE(1),2) & HEXSTRING(SC.GETBYTE(2),2) & HEXSTRING(SC.GETBYTE(3),2)& HEXSTRING(SC.GETBYTE(4),2)& VbCr
Sc.Print "********************************************" & VbCr
PRINT HexString(bytes, 2)
print " was hit at " & HexString(RT, 4) & " delay ----VCC WAS " & HexString(VCC, 2)& vbcr
Sc.Print "********************************************" & VbCr
print
SC.DELAY(2500)
Call Sc.ProgressBox ("", 0, 0, "")
sc.print "Elapsed Time: " + FormatNumber((CDbl(Now) - CDbl(ScriptStart)) * 24 * 60, 2, True, True, True) + " minutes" & vbcr
if TestMode = 0 then
sc.verbose=TRUE
Sc.Write("0A 15 A3 21 92 00 B3 0E 03 85 00")
SC.READ(2)
Bytes = Sc.Getbyte(1)
if Bytes > 4 then
Sc.Read(5)
bytes=sc.getbyte(3)
END IF
SC.DELAY(30)
PRINT "***************************" & VBCR
PRINT "* A23 CAM should be OPEN *" & VBCR
PRINT "* test in Nagra to see. *" & VBCR
PRINT "* if not, try again. *" & VBCR
PRINT "***************************" & VBCR
exit sub
end if
sc.verbose=false
end if
else
PRINT " RESET "
Card_reset
GetAtr
End if
Sc.Write("08 0e 03 10 01 01 03 9a 00") 'reset card
sc.read(02)
sc.delay(5)
LOOP
End Sub
'************************************************* ********
'************************************************* ********
Sub DefaultMod3()
ScriptStart = Now
TimeElapsed = 0
TimeInMinutes = 0
TimeInHours = 0
VCC = VCCStart
RT = DelayStart
sc.verbose=TRUE
Sc.Write("12 15 AB 21 00 08 A0 CA 00 00 02 12 00 06 55 0E 03 85 00")
Sc.Read(02)
Bytes = Sc.Getbyte(1)
if Bytes > 5 then
Sc.Read(6)
end if
print
if TestMode = 1 then
print " You are in testmode, cam will not open in this mode!!!" & vbcr
print " set TestMode = 0 to open cam " & vbcr & vbcr
end if
sc.verbose=false
Do
VCC=INT(RND * (VCCstart-VCCLimit)) + VCCLimit
RT=INT(RND * (DelayEnd-DelayStart)) + DelayStart
Sc.Write("B0" & HexString(VCC, 2))
SC.DELAY(11)
Sc.Write("61 15 F6 21 00")
Sc.Write("53 A0 CA 00 00 4D 03 4B 00 C5 10 6F 15 CC 00 CC")
Sc.Write("00 CC 00 CC 00 0C CD 32 0C 5A EA 2D 2D 0C CD 32")
Sc.Write("0C 5A EA 2D 2D B1 C4 45 F4 E1 20 14 80 8D 4C F0")
Sc.Write("AA A6 1D 0D AA 1D F4 97 65 2E 88 4E 25 0C CD 32")
Sc.Write("0C 5A EA 2D 2D B1 C4 45 F4 E1 20 14 80 05 67 21")
Sc.Write("92 00 00 00 7D 20" & HexString(RT, 4) & "09 0E 05 85 00")
Sc.Read(02)
Bytes = Sc.Getbyte(1)
if Bytes > 4 then
Sc.Read(5)
bytes=sc.getbyte(3)
call progupdate(trycnt2 , RT, VCC, bytes)
TryCnt2 = TryCnt2 + 1
if trycnt2 > trycnt then
' RT = RT + 1
TRYCNT2 = 0
VCC = VCC - &h1
if VCC < VCCLimit then
VCC = VCCStart
END IF
END IF
if bytes = &H83 then
print
print
print "*********** Glitch Successfull *************"& VbCr
PRINT "Answer= " & HEXSTRING(SC.GETBYTE(0),2) & HEXSTRING(SC.GETBYTE(1),2) & HEXSTRING(SC.GETBYTE(2),2) & HEXSTRING(SC.GETBYTE(3),2)& HEXSTRING(SC.GETBYTE(4),2)& VbCr
Sc.Print "********************************************" & VbCr
PRINT HexString(bytes, 2)
print " was hit at " & HexString(RT, 4) & " delay ----VCC WAS " & HexString(VCC, 2)& vbcr
Sc.Print "********************************************" & VbCr
print
SC.DELAY(2500)
Call Sc.ProgressBox ("", 0, 0, "")
sc.print "Elapsed Time: " + FormatNumber((CDbl(Now) - CDbl(ScriptStart)) * 24 * 60, 2, True, True, True) + " minutes" & vbcr
if TestMode = 0 then
sc.verbose=TRUE
Sc.Write("0A 15 A3 21 92 00 B3 0E 03 85 00")
SC.READ(2)
Bytes = Sc.Getbyte(1)
if Bytes > 4 then
Sc.Read(5)
bytes=sc.getbyte(3)
END IF
SC.DELAY(30)
PRINT "***************************" & VBCR
PRINT "* A23 CAM should be OPEN *" & VBCR
PRINT "* test in Nagra to see. *" & VBCR
PRINT "* if not, try again. *" & VBCR
PRINT "***************************" & VBCR
exit sub
end if
sc.verbose=false
end if
else
PRINT " RESET "
Card_reset
GetAtr
End if
Sc.Write("08 0e 03 10 01 01 03 9a 00") 'reset card
sc.read(02)
sc.delay(5)
LOOP
End Sub
'************************************************* ********
'************************************************* ********
Sub ProgUpdate(CnTv,DlYv,VCCv,ByteSv)
Dim mtries
Dim i
Dim Msg
Call FormatTime
Msg="Sending glitches to card with the following information: " & vblf & "Delay= " & hexstring(RT,4) & " VCC= " & hexstring(vcc,2) & " Response= "& hexstring(BytesV,2) & vblf & "Elapsed Time: " + FormatNumber((CDbl(Now) - CDbl(ScriptStart)) * 24 * 60, 2, True, True, True) + " minutes"
Call Sc.ProgressBox(Msg,CnTv,350,"A23U_Winex: " & "Glitch # " & CnTv )
End Sub
'************************************************* ********
Function FormatTime
TimeElapsed = FormatNumber((CDbl(Now) - CDbl(TempScriptStart)) * 24 * 60 * 60, 0, True, True, True)
If TimeElapsed > 59 then
TempScriptStart = Now
TimeInMinutes = TimeInMinutes + 1
TimeElapsed = 0
End If
If TimeInMinutes > 59 then
TempScriptStart = Now
TimeInHours = TimeInHours + 1
TimeElapsed = 0
TimeInMinutes = 0
End If
If TimeInHours > 0 then
If TimeElapsed < 10 then
If TimeInMinutes < 10 then
RunTime="" & TimeInHours & ":0" & TimeInMinutes & ":0" & TimeElapsed
Else
RunTime="" & TimeInHours & ":" & TimeInMinutes & ":0" & TimeElapsed
End If
else
If TimeInMinutes < 10 then
RunTime="" & TimeInHours & ":0" & TimeInMinutes & ":" & TimeElapsed
Else
RunTime="" & TimeInHours & ":" & TimeInMinutes & ":" & TimeElapsed
End If
End If
else
If TimeElapsed < 10 then
If TimeInMinutes > 0 then
RunTime="" & TimeInMinutes & ":" & "0" & TimeElapsed
Else
RunTime="" & ":" & "0" & TimeElapsed
End If
Else
If TimeInMinutes > 0 then
RunTime="" & TimeInMinutes & ":" & TimeElapsed
Else
RunTime="" & ":" & TimeElapsed
End If
End If
End If
End Function
'************************************************* ********
'************************************************* ********
Function GetATR ()
verbose = 0
Dim temp
Call Sc.ProgressBox(0,0,0,0)
Sc.Write("07 0e 03 10 01 03 9a 00")
Sc.Delay(300)
Sc.Read(&h02)
temp = Sc.GetByte(&h01)
Sc.Read (temp)
if(temp <> 20) then
GetATR = False
else
GetATR = True
End if
End Function
'************************************************* ********
Function ReceiveATR()
Dim i
Dim RetValue
sc.verbose=false
Sc.Write("07 0e 03 10 01 03 9a 00")
Sc.Delay(80)
If sc.BytesInBuffer > 0 then
Sc.Read(&h02)
else
Call Sc.ProgressBox ("", 0, 0, "")
Call OopsNoATR()
'Exit Function
end if
RetValue = Sc.GetByte(&h01)
Sc.Read (RetValue)
ATR = ""
For i = 0 to RetValue -1
ATR = ATR & HexString(Sc.GetByte(i), 2) & " "
Next
If(RetValue < 20) Then
ReceiveATR = 0
Else
ReceiveATR = 1
End If
End Function
'************************************************* ********************
Sub OopsNoATR()
Sc.MsgBox(" Card is not returning an ATR " &VbCr & " The card may not be fully Inserted " & VbCr &" Loader flash 8 or 9 is needed " )
End Sub
'************************************************* ****************
Sub Card_Reset()
Dim RetValue
sc.verbose=false
sc.print "Doing card reset..."& vbcr
Sc.Write("A0") ' Turn the LED off if it is on
Sc.Write("020200") ' Power down the card
Sc.Delay(1000) ' Wait about 1 second
Call Sc.Reset() ' Power up the card
RetValue=Sc.Flush() ' Flush the receive buffer
End Sub
'************************************************* ****************
Sub IsCardPresent()
Dim RetValue
Dim GotInput
ScriptStart = Now
Sc.Print "----------------------------------------------------------------" & vbCr
Sc.Print "Start: " & ScriptStart & vbCr 'main screen
Sc.Print "----------------------------------------------------------------" & vbCr
Do
sc.verbose=false
Call Sc.Reset() ' Power up the card
Sc.Write("A0") ' turn the LED off
Sc.Write("80") 'Is card present?
Sc.Delay(100)
If Sc.BytesInBuffer > 0 then
Sc.Read(&h01)
RetValue = Sc.GetByte(0)
end if
If RetValue = &h0 then
Call Sc.ProgressBox ("No Card Detected!" & VbCr & "Please insert your card!.....", 1, 999, "A23U_WNX")
GotInput = False
Else
If RetValue = &hFF then
GotInput = True
else
If RetValue <> &h0 or RetValue <> &hFF then
Sc.Write("A0") ' turn the LED off
Sc.Write("020200")
Sc.Delay(100)
If Sc.BytesInBuffer > 1 then
Sc.Read(&h02)
GotInput = False
else
GotInput = False
end if
end if
End if
End if
Loop Until GotInput = True
Call Sc.ProgressBox ("", 0, 0, "")
end sub
'************************************************* ********
Function HexString(Number,Length)
' This function takes 2 arguments, a number and a length. It converts the decimal
' number given by the first argument to a Hexidecimal string with its length
' equal to the number of digits given by the second argument
Dim RetVal
Dim CurLen
RetVal=Hex(Number)
CurLen=Len(RetVal)
If CurLen<Length Then
RetVal=String(Length-CurLen,"0") & RetVal
End If
HexString=RetVal
End Function
'************************************************* ********
Function Hex2Dec(HexNumber)
Dim DecimalValue
Dim DigitCount
Dim Digit
Dim HexDigit
HexNumber = Replace(UCase(HexNumber), " ", "")
DigitCount = Len(HexNumber)
For Digit = 1 To DigitCount
HexDigit = Mid(HexNumber, Digit, 1)
If Asc(HexDigit) < 58 Then
DecimalValue = HexDigit * 16 ^ (DigitCount - Digit)
Else
DecimalValue = (Asc(HexDigit) - 55) * 16 ^ (DigitCount - Digit)
End If
Hex2Dec = Hex2Dec + DecimalValue
Next
End Function
'************************************************* ********
Function setupunlocker()
sc.print "Setting up Winex for Unlocker Script" & VbCr
Wx.BaudRate = 115200
Wx.ResetBaudRate = 115200
Wx.Parity = 0 ' 0 = None, 1 = Odd, 2 = Even, 3 = Mark, 4 = Space
Wx.StopBits = 0 ' 0 = 1 stop bit, 1 = 1.5 stop bits, 2 = 2 stop bits
Wx.DTRControl = 0 ' Initial state of DTR 0 = off, 1 = on
Wx.RTSControl = 1 ' Initial state of RTS 0 = off, 1 = on
Wx.ResetDelay = 100 ' In microseconds
Wx.ByteDelay = 10 ' In microseconds
Wx.RxByteTimeout = 500 ' In milliseconds
Wx.ResetMode = 2 ' 0 = No Resets, 1 = ISO Reset (Expect a ATR), 2 = Device Reset (No ATR)
Wx.ResetLine = 0 ' 0 = Toggle RTS for Reset, 1 = Toggle DTR for Reset
Wx.ByteConvention = 1 ' 0 = Inverse, 1 = Direct
Wx.FlushEchoByte = 0 ' 0 = no flush, 1 = flush - A Phoenix interface will echo each byte transmitted.
Wx.FlushBeforeWrite = 1 ' 0 = no flush, 1 = flush - Flush the receive buffer before each write to strip off Null bytes.
Wx.IgnoreTimeouts = 1 ' 0 = Abort script on a receive timeout, 1 = Ignore all receive timeouts
Wx.ResetAfterTimeout = 0 ' 0 = Don't reset after a timeout, 1 = do a reset after a timeout - Not used if "IgnoreTimeouts=0"
Wx.LogTransactions = 0 ' 0 = Don't log transactions, 1 = log transactions
Wx.DisplayUSW = 0 ' Display USW after script complete 0 = no, 1 = yes
Wx.DisplayFuse = 0 ' Display Fuse after script complete 0 = no, 1 = yes
End function
:::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::
just past into winexplorer V5.0 and run it:):)free for you free for me:):)
bobsmith161
02-10-2006, 05:38 AM
ok guy's don't hang me..... but it seems that i posted the wrong file try this one for ISO:)
' New VB Script File - Created 9/25/04
' FOR Dish rom 10 A23 rev STREAMLOCKED only.
'************************************************* *************************************
'Instruction Table
'01 Reset Card (Leaves card clock off)
'02 4.608 MHz Card Clock Off -FREEZE CAM
'03 4.608 MHz Card Clock On - FREE RUNNING CAM
'04 XX XX Delay $XXXX card clocks and glitch VCC on high phase with 1.152 MHz Card clock
'05 XX XX Delay $XXXX card clocks and glitch VCC on high phase with 1.536 MHz Card clock
'07 XX XX Delay $XXXX card clocks and glitch VCC on low phase with 1.152 MHz Card clock
'06 XX XX Delay $XXXX card clocks and glitch VCC on low phase with 1.536 MHz Card clock
'09 rom 10 glitch DELAY -- 2*CARD CLOCKS -- ex. 2x xx xx 09 for timing
'0E XX SET WD TIMER
'0F POWER DOWN CAM
'1X TX RX SPEED
'2X XX XX Delay $2X XX XX Atmel clock cycles
'8X-9X Rx from card, instruction anded with $1f plus 1 bytes Ex. $9F = rx $20 bytes
'aX-FX Tx to card, instruction anded with $5f plus 1 bytes Ex. $FF = Tx $60 bytes
'************************************************* *************************************
'Commands
'80 Check Card Presence - Sends 1 byte
'90 Get chip ID - Sends 4 Bytes (DISH)
'AX Set Bi-color Led - X = 0 off, X = 1 Red, X = 2 Green
'B0 XX Set Glitch VCC - VCC = (5/255) * XX
Option Explicit
Dim Bytes
dim bytes2
Dim BR2(5)
Dim VCCStart
Dim VCCLimit
Dim VCC
Dim DelayEnd
Dim DelayStart
Dim GlitchType
Dim TryCnt
DIM TryLimit
DIM TRYCNT2
DIM RT
DIM TestMode
TRYCNT2=1
Sub Main()
' These are the variables you can change for rom 10 dish A23
VCCStart = &h1A 'YOU CAN CHANGE THIS FROM 18-30
VCCLimit = &h13 'YOU CAN CHANGE THIS FROM 10-20
DelayStart=&h123E 'DISH A23 is 123E- could be as low as 1100
DelayEnd = &H125A 'DISH A23 IS 125A- could be as high as 127A
TryCnt = 300 'Number of tries per delay FROM 5-50000
TestMode = 0 'TestMode, 1 = ON, 0 = OFF
'TestMode is used to find a glitch point on A81 cam. once you find the
'delay and vcc settings on cam then set TestMode = 0, and open the cam.
' end of variables
GlitchType=&h09
VCC = VCCStart
RT = DelayStart
' turn led off
sc.verbose=TRUE
Sc.Write("A0")
Sc.Delay(50)
Sc.Write("A0")
Sc.Delay(50)
' card is in turn led on
Sc.Write("A1")
' get atr
sc.verbose=TRUE
Sc.Write("07 0e 03 10 01 03 9a 00") 'reset card
Sc.Read(02)
Bytes = Sc.Getbyte(1)
if Bytes > 25 then
Sc.Read(25)
end if
Sc.Write("12 15 AB 21 00 08 A0 CA 00 00 02 12 00 06 55 0E 03 85 00")
Sc.Read(02)
Bytes = Sc.Getbyte(1)
if Bytes > 5 then
Sc.Read(6)
end if
print
if TestMode = 1 then
print " You are in testmode, cam will not open in this mode!!!" & vbcr
print " set TestMode = 0 to open cam " & vbcr & vbcr
end if
print " Now we will try " & HexString(RT, 4) & " delay" & vbcr
sc.verbose=false
Do
VCC = VCC - 1.0
if VCC < VCCLimit then
VCC = VCCStart
END IF
'if rt > DelayEnd then
'rt = DelayStart
'END IF
Sc.Write("B0" & HexString(VCC, 2))
SC.DELAY(11)
Sc.Write("61 15 F6 21 00")
Sc.Write("53 A0 CA 00 00 4D 03 4B 00 C5 10 6F 15 CC 00 CC")
Sc.Write("00 CC 00 CC 00 0C CD 32 0C 5A EA 2D 2D 0C CD 32")
Sc.Write("0C 5A EA 2D 2D B1 C4 45 F4 E1 20 14 80 8D 4C F0")
Sc.Write("AA A6 1D 0D AA 1D F4 97 65 2E 88 4E 25 0C CD 32")
Sc.Write("0C 5A EA 2D 2D B1 C4 45 F4 E1 20 14 80 05 67 21")
Sc.Write("92 00 00 00 7D 20" & HexString(RT, 4) & "09 0E 05 85 00")
Sc.Read(02)
Bytes = Sc.Getbyte(1)
if Bytes > 4 then
Sc.Read(5)
bytes=sc.getbyte(3)
PRINT HexString(bytes, 2)
TryCnt2 = TryCnt2 + 1
if trycnt2 > trycnt then
RT = RT + 1
TRYCNT2 = 0
if rt > DelayEnd then
rt = DelayStart
END IF
print
print " now we will try " & HexString(RT, 4) & " delay"
print
END IF
if bytes = &H83 then
print
print
print "*********** we hit our bug *************"& VbCr
PRINT HEXSTRING(SC.GETBYTE(0),2) & HEXSTRING(SC.GETBYTE(1),2) & HEXSTRING(SC.GETBYTE(2),2) & HEXSTRING(SC.GETBYTE(3),2)& HEXSTRING(SC.GETBYTE(4),2)& VbCr
Sc.Print "===========================================" & VbCr
PRINT HexString(bytes, 2)
print " was hit at " & HexString(RT, 4) & " delay ----VCC WAS " & HexString(VCC, 2)
print
SC.DELAY(2500)
if TestMode = 0 then
sc.verbose=TRUE
Sc.Write("0A 15 A3 21 92 00 B3 0E 03 85 00")
SC.READ(2)
Bytes = Sc.Getbyte(1)
if Bytes > 4 then
Sc.Read(5)
bytes=sc.getbyte(3)
END IF
SC.DELAY(30)
PRINT "***************************" & VBCR
PRINT "* A23 CAM should be OPEN *" & VBCR
PRINT "* test in Nagra to see. *" & VBCR
PRINT "* if not, try again. *" & VBCR
PRINT "***************************" & VBCR
exit sub
end if
sc.verbose=false
end if
else
PRINT" RESET "
End if
Sc.Write("08 0e 03 10 01 01 03 9a 00") 'reset card
sc.read(02)
sc.delay(5)
LOOP
End Sub
Function HexString(Number,Length)
' This function takes 2 arguments, a number and a length. It converts the decimal
' number given by the first argument to a Hexidecimal string with its length
' equal to the number of digits given by the second argument
Dim RetVal
Dim CurLen
RetVal=Hex(Number)
CurLen=Len(RetVal)
If CurLen<Length Then
RetVal=String(Length-CurLen,"0") & RetVal
End If
HexString=RetVal
End Function
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.