PDA

View Full Version : Transform your old v2.3 card into a "new look" card to emulate UPClock



toysoft
09-03-2013, 03:08 PM
Transform your old v2.3 card into a "new look" card to emulate receiver UPC lock,

You card stays v2.3 and can be reprogrammed again, but this changes the internal OPERATORS to allow to use as Free To Air "locked" boxes,

TS

------------------

'
' Load to Viaccess 2.3, TPS Sagem ISD2210
'

Dim D(&h1FD0)

' Set Protocol and COM
Dim CheckSmartcardSettings
Call SmartcardSettings

Sub Main()
For I=0 To &h1FCF
D(I)=0
Next


D(0)=255:D(1)=255:D(2)=255:D(3)=3 1:D(4)=90:D(5)=122:D(6)=106:D(7)= 3:D(8)=235:D(9)=255:D(10)=250:D(1 1)=24:D(12)=45:D(13)=130:D(14)=10 7:D(15)=0:
D(16)=119:D(17)=255:D(18)=254:D(1 9)=18:D(20)=121:D(21)=255:D(22)=2 55:D(23)=177:D(24)=125:D(25)=201: D(26)=17:D(27)=56:D(28)=133:D(29) =201:D(30)=198:D(31)=164:
D(32)=76:D(33)=255:D(34)=0:D(35)= 11:D(36)=240:D(37)=0:D(38)=92:D(3 9)=255:D(40)=223:D(41)=255:D(42)= 255:D(43)=0:D(44)=107:D(45)=255:D (46)=255:D(47)=58:
D(48)=4:D(49)=213:D(50)=17:D(51)= 0:D(52)=0:D(53)=0:D(54)=0:D(55)=0 :D(56)=0:D(57)=0:D(58)=95:D(59)=2 55:D(60)=246:D(61)=182:D(62)=172: D(63)=172:
D(64)=170:D(65)=186:D(66)=173:D(6 7)=0:D(68)=111:D(69)=255:D(70)=23 8:D(71)=255:D(72)=215:D(73)=255:D (74)=255:D(75)=255:D(76)=239:D(77 )=253:D(78)=53:D(79)=223:
D(80)=238:D(81)=252:D(82)=171:D(8 3)=175:D(84)=172:D(85)=0:D(86)=12 1:D(87)=255:D(88)=255:D(89)=97:D( 90)=141:D(91)=229:D(92)=20:D(93)= 211:D(94)=166:D(95)=177:
D(96)=255:D(97)=232:D(98)=121:D(9 9)=255:D(100)=254:D(101)=163:D(10 2)=172:D(103)=159:D(104)=84:D(105 )=91:D(106)=156:D(107)=221:D(108) =255:D(109)=227:D(110)=121:D(111) =255:
D(112)=251:D(113)=192:D(114)=244: D(115)=25:D(116)=192:D(117)=105:D (118)=80:D(119)=129:D(120)=214:D( 121)=91:D(122)=121:D(123)=255:D(1 24)=250:D(125)=225:D(126)=180:D(1 27)=236:
D(128)=190:D(129)=110:D(130)=124: D(131)=55:D(132)=194:D(133)=214:D (134)=76:D(135)=254:D(136)=255:D( 137)=126:D(138)=240:D(139)=0:D(14 0)=92:D(141)=254:D(142)=223:D(143 )=255:
D(144)=64:D(145)=0:D(146)=76:D(14 7)=253:D(148)=255:D(149)=126:D(15 0)=224:D(151)=0:D(152)=92:D(153)= 253:D(154)=223:D(155)=255:D(156)= 64:D(157)=0:D(158)=121:D(159)=254 :
D(160)=254:D(161)=255:D(162)=255: D(163)=255:D(164)=255:D(165)=255: D(166)=255:D(167)=255:D(168)=255: D(169)=0:D(170)=121:D(171)=254:D( 172)=247:D(173)=5:D(174)=85:D(175 )=172:
D(176)=118:D(177)=74:D(178)=156:D (179)=244:D(180)=222:D(181)=196:D (182)=121:D(183)=254:D(184)=255:D (185)=255:D(186)=255:D(187)=255:D (188)=255:D(189)=255:D(190)=255:D (191)=255:
D(192)=255:D(193)=0:D(194)=121:D( 195)=253:D(196)=255:D(197)=255:D( 198)=255:D(199)=255:D(200)=255:D( 201)=255:D(202)=255:D(203)=255:D( 204)=255:D(205)=0:D(206)=121:D(20 7)=253:
D(208)=254:D(209)=255:D(210)=255: D(211)=255:D(212)=255:D(213)=255: D(214)=255:D(215)=255:D(216)=255: D(217)=0:D(218)=0:D(219)=0:D(220) =0:D(221)=0:D(222)=125:D(223)=0:
D(224)=240:D(225)=0:D(226)=121:D( 227)=253:D(228)=247:D(229)=116:D( 230)=28:D(231)=85:D(232)=218:D(23 3)=97:D(234)=169:D(235)=199:D(236 )=204:D(237)=156:D(238)=121:D(239 )=253:
D(240)=246:D(241)=186:D(242)=35:D (243)=255:D(244)=242:D(245)=84:D( 246)=108:D(247)=29:D(248)=158:D(2 49)=175:D(250)=95:D(251)=254:D(25 2)=242:D(253)=170:D(254)=175:D(25 5)=188:
D(256)=223:D(257)=185:D(258)=141: D(259)=158:D(260)=145:D(261)=156: D(262)=154:D(263)=0:D(264)=95:D(2 65)=253:D(266)=245:D(267)=188:D(2 68)=190:D(269)=177:D(270)=190:D(2 71)=179:
D(272)=212:D(273)=223:D(274)=0:D( 275)=0:D(276)=73:D(277)=0:D(278)= 211:D(279)=59:D(280)=255:D(281)=2 55:D(282)=255:D(283)=255:D(284)=2 55:D(285)=255:D(286)=255:D(287)=2 55:
D(288)=124:D(289)=254:D(290)=58:D (291)=4:D(292)=213:D(293)=17:D(29 4)=124:D(295)=253:D(296)=58:D(297 )=4:D(298)=213:D(299)=17:D(300)=1 24:D(301)=255:D(302)=58:D(303)=4:
D(304)=213:D(305)=17:D(306)=0:D(3 07)=0:D(308)=0:D(309)=0:D(310)=0: D(311)=0:D(312)=0:D(313)=0:D(314) =0:D(315)=0:D(316)=0:D(317)=0:D(3 18)=0:D(319)=0:
D(7184)=0:D(7185)=255:D(7186)=255 :D(7187)=255:D(7188)=252:D(7189)= 0:D(7190)=195:D(7191)=12:D(7192)= 0:D(7193)=48:D(7194)=12:D(7195)=0 :D(7196)=3:D(7197)=0:D(7198)=48:D (7199)=3:
D(7200)=0:D(7201)=48:D(7202)=3:D( 7203)=12:D(7204)=48:D(7205)=195:D (7206)=0:D(7207)=48:D(7208)=3:D(7 209)=0:D(7210)=48:D(7211)=3:D(721 2)=0:D(7213)=3:D(7214)=48:D(7215) =3:
D(7216)=0:D(7217)=48:D(7218)=0:D( 7219)=192:D(7220)=12:D(7221)=0:D( 7222)=195:D(7223)=12:D(7224)=0:D( 7225)=0:D(7226)=0:D(7227)=0:D(722 8)=0:D(7229)=0:D(7230)=0:D(7231)= 0:
D(8128)=0:D(8129)=0:D(8130)=0:D(8 131)=3:D(8132)=0:D(8133)=0:D(8134 )=0:D(8135)=2:D(8136)=0:D(8137)=0 :D(8138)=0:D(8139)=0:D(8140)=2:D( 8141)=223:D(8142)=104:D(8143)=45

Sc.Write("CA A4 02 00 00")
Sc.Read(2)
Sc.Write("CA AC A4 00 00")
Sc.Read(3)
Sc.Write("CA 88 00 08 38")
Sc.Read(1)
Sc.Write("00 00 9C 5F AD 10 5C E7 FF 20 00 B3 32 26 F5 A6 81 B7 2D 20 3E 45")
Sc.Write("BF 22 00 00 FD A6 6C AD 15 A6 09 B7 23 59 00 00 00") 'Bootstrap
Sc.Write("A6 46 AD 09 9F 3A 23 26 F3 43 BE 22 81 4A 26 FD 81") 'code
Sc.Read(2)
Sc.Write("BC 52 00 00 00")
Sc.Read(2)
Sc.Write("CA B8 00 00 45")
RX
Sc.Write("CA 18 00 0B 00")
Sc.Read(2)
Sc.Write("CA B8 00 00 02")
Sc.Read(5)
Sc.Write("00 7F 00 00 24") ' Launching bootstrap ; P3 = bytes_to_load
'================= CODE TO LOAD BY THE BOOTSTRAP : ==================
Sc.Write("cd 53 a6 bd c3 b7 2b bd c3 b7 2c bd c3 b7 b7 5f")
Sc.Write("cd 58 45 bd 2a cd 57 ca cd 58 45 b6 b7 bd 2a cd")
Sc.Write("58 08 20 dc")
Sc.Read(1)
Sc.Verbose=False
Sc.Print(vbcr & "Rewriting EEPROM ..." & vbcr)
A=0
For I=0 To &h1FCF Step &h10
Sc.Print(vbcr & H(&hE020+I,4) & " : ")
For J=0 To &hF
B=D(A)
Sc.Print(H(B,2) & " ")
Sc.Write(H(&hE020+A,4) & H(B,2))
FastGetByte
A=A+1
Next
Next
Sc.Reset
Sc.Print(vbcr & vbcr & "PC2.3 is cleared and reloaded with UPC v2.3 Card !!!")
End Sub

Function H(S,L)
H = Hex(S)
H = Mid("0000", 1, L-Len(H)) + H
End Function

Function RX
Sc.Delay(250)
Sc.Read(Sc.BytesInBuffer)
End Function

Function FastGetByte
Do
Sc.Delay(10)
Loop While Sc.BytesInBuffer=0
Sc.Read(Sc.BytesInBuffer)
End Function


Sub SmartcardSettings()
ComPort = Sc.InputBox("Phoenix COM Port ? ", "Config Com Port", 2)
If ComPort = "" Then
CheckSmartcardSettings = 1
Exit Sub
End If
Sc.Print (vbCr & "- config WinExplorer..." & vbCr)
Wx.CommPort = "com" & ComPort & ":"
Wx.BaudRate = 9600
Wx.ResetBaudRate = 9600 ' Baudrate **01**
Wx.Parity = 1 ' 0 = None, 1 = Odd, 2 = Even, 3 = Mark, 4 = Space
Wx.StopBits = 2 ' 0 = 1 stop bit, 1 = 1.5 stop bits, 2 = 2 stop bits
Wx.DTRControl = 1 ' Initial state of DTR 0 = off, 1 = on
Wx.RTSControl = 0 ' Initial state of RTS 0 = off, 1 = on
Wx.ResetDelay = 400 ' In microseconds
Wx.ByteDelay = 400 ' In microseconds
Wx.RxByteTimeout = 500 ' In milliseconds
Wx.ResetMode = 1 ' 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 = 0 ' 0 = Inverse, 1 = Direct
Wx.FlushEchoByte = 1 ' 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 Sub