PDA

View Full Version : padhack.tcl and v4 - resource group confusion.



philhu
09-15-2004, 11:57 AM
hi

I am looking at the old padhack.tcl, which is supposed to work for '3.x and greater'

Well, the resources seems to have moved, or I am confused by tcl.

I go into Tivowebplus, select mfs, syActvie, resource groups.

They index 32 down into a variable, so I move across 32 in the list in MFS in TWP

So I go into tcl and paste/type padhack, looking at element 19 of resgroup 32
and it is wrong, but 20 is the right string.

Ok, paste/type in padhack to that line, look at index 19 and index 20 of resgroup 32 in tcl, both are wrong.

I am not a tcl genius, so I am just learning. What did I do wrong?

This is the padhack code I am using, writtn, I thin, by Embeem:

EnableTransactionHoldoff true

set db [dbopen]
transaction {
set swsysa [db $db open "/SwSystem/ACTIVE"]
set resgrp [dbobj $swsysa get ResourceGroup]
set tmpgrp [lindex $resgrp 32]
set tmpres [lindex [dbobj $tmpgrp get "Item"] 19]
dbobj $tmpres set String "On-time|0|1 minute early|60|2 minutes early|120|3 minutes early|180|4 minutes early|240|5 minutes
early|300|10 minutes early|600|1 minute late|-60|2 minutes late|-120|3 minutes late|-180|4 minutes late|-240|5 minutes late|-3
00|10 minutes late|-600|"

set tmpres [lindex [dbobj $tmpgrp get "Item"] 21]
dbobj $tmpres set String "On-time|0|1 minute longer|60|2 minutes longer|120|5 minutes longer|300|15 minutes longer|900|30 mi
nutes longer|1800|1 hour longer|3600|1 1/2 hours longer|5400|3 hours longer|10800|1 minute shorter|-60|2 minutes shorter|-120|
3 minutes shorter|-180|4 minutes shorter|-240|5 minutes shorter|-300|10 minutes shorter|-600|"

dbobj $tmpgrp remove "CompressedFile"
puts "done, please reboot"
}

psxboy
09-15-2004, 01:23 PM
So I go into tcl and paste/type padhack, looking at element 19 of resgroup 32
and it is wrong, but 20 is the right string.

The first element in a resource group is #0, the second is #1, etc. So if you're counting the elements, the 20th one is #19.

-psxboy

alldeadhomiez
09-15-2004, 01:31 PM
Resource groups frequently change across versions (especially their "ordering").

Sometimes looking them up by ID works, but that also tends to break across major versions (especially 4.x to 5.x).

To find the new location, get a copy of your swsystem slice, then readguide and grep.

philhu
09-15-2004, 02:31 PM
I found them.

It is resourceGroup 31, not 32

I wrote a quickie tcl program to dump item 19 and 21 from resgrps 0-50

It was in 31

Thanks all!

philhu
09-15-2004, 02:32 PM
Resource groups frequently change across versions (especially their "ordering").

Sometimes looking them up by ID works, but that also tends to break across major versions (especially 4.x to 5.x).

To find the new location, get a copy of your swsystem slice, then readguide and grep.


Where can I get the swsystem slice for 4.01b-02?

I grepped it, and looked on the tivo, not found

psxboy
09-15-2004, 02:38 PM
Where can I get the swsystem slice for 4.01b-02?

I grepped it, and looked on the tivo, not found

It comes down as part of a software upgrade. I have a bnd-encrypted version but I've been unsuccessful in decrypting it. (I did learn a little bit about session keys and such though...) If anyone has any references on how to do it with bf I'm all ears.

-psxboy

rc3105
09-15-2004, 02:42 PM
/tvlib/tcl/tv/unbundler.tcl

psxboy
09-15-2004, 02:57 PM
Thanks, rc... that's what I've been working off of, but the encryption keys are no longer stored in Setup/. I think I found them in State/Keyring/ but they're in a different format & I haven't been able to work out a manual process by following the unbundler script yet.

I was able to extract the session key and the gz.bf file from the bnd archive but I couldn't figure out the process to decrypt the session key and then use it to decrypt the bf file. (Kept getting messages to the effect of "Extra data at end of encrypted stream" ... not sure if that's an actual problem or not yet. FWIW, I also get checksum errors during the initial cpio operation... could my source file be hosed?)

I'm close though... maybe I'll try rewriting the script to pull the keys properly and let the rest of the script do the actual work. My intention for doing this in the first place was to arrive at a set of usable 4.0.1b-02 slices.

-psxboy

tivo4mevo
01-07-2007, 02:19 AM
Using mbm's grabpkg.c with AW's modifications, I compiled the kernel module and captured some 8.1 slices.

Am I correct that one must rewrite unbundler.tcl to work with the /State/Keyring/SWE_81-1 MFS structure (and ultimately get the decrypted swsystem slice)?

*EDIT* modifying unbundler.tcl to search through /State/Keyring/ instead of /Setup/EncryptionKeys did the trick.

smokey75
11-16-2007, 10:01 AM
I had wanted a copy of the modified unbundler.tcl and someone was nice enough to point me towards it.

Thanks all.

robrinker
11-21-2007, 01:53 PM
Someone helped me as well.

Thanks!

ScanMan
11-22-2007, 11:32 AM
With a little help from my friends, I've gotten through this. As indicated above, you have to mod 'unbundler' with the exact name of the SWE* key you receive. And be aware that the SWE* key "disappears" sometime after the update is received/loaded.