Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

.tbc decompiler!

1,424 views
Skip to first unread message

sisw...@gmail.com

unread,
May 21, 2007, 10:40:09 AM5/21/07
to
Hello...
Does any one can write some code in tcl language or other for
decompile tcl from bytecodes?
I very need it to deobfuscated some tcl that I write & because of my
fool I can't get my real codes again! :-( I can't rewrite my codes
again from beginning (my code is about 545KB for size).
I've been read the tbcload source code but it's in C language (woow it
's too hard for me).

Many thnx for all of you that can help me to solve my problem...

---
ZEXEL

Gerald W. Lester

unread,
May 21, 2007, 7:25:56 PM5/21/07
to

To the best of my knowledge no one has a .tbc -> .tcl tool.


--
+--------------------------------+---------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+

Alexandre Ferrieux

unread,
May 22, 2007, 4:41:16 AM5/22/07
to
On May 22, 1:25 am, "Gerald W. Lester" <Gerald.Les...@cox.net> wrote:

> siswap...@gmail.com wrote:
> > Hello...
> > Does any one can write some code in tcl language or other for
> > decompile tcl from bytecodes?
> > I very need it to deobfuscated some tcl that I write & because of my
> > fool I can't get my real codes again! :-( I can't rewrite my codes
> > again from beginning (my code is about 545KB for size).
> > I've been read the tbcload source code but it's in C language (woow it
> > 's too hard for me).
>
> > Many thnx for all of you that can help me to solve my problem...
>
> To the best of my knowledge no one has a .tbc -> .tcl tool.
>

Side question: is the .tbc still in sync with the current in-memory
bytecode VM, or did they diverge at some point after the Scriptics
era ?

If yes, then maybe the code implementing ::tcl_traceCompile could be
adapted to disassemble tbc. After that, going back from text VM
instructions to some form of Tcl code would be an interesting project,
be it only for pedagogic purposes...

-Alex

sisw...@gmail.com

unread,
May 22, 2007, 12:33:27 PM5/22/07
to
On May 22, 3:41 pm, Alexandre Ferrieux <alexandre.ferri...@gmail.com>
wrote:

Great, can you tell me how to use the ::tcl_traceCompile in tcl script
for disassemble .tbc file?
I have filename called: stoptest.tbc (545KB) and so I want
use ::tcl_traceCompile to disassemble it become .tcl again :)
Thx you very much...

--
ZEXEL

sisw...@gmail.com

unread,
May 22, 2007, 12:35:02 PM5/22/07
to
On May 22, 3:41 pm, Alexandre Ferrieux <alexandre.ferri...@gmail.com>
wrote:

Great, can you tell me how to use the ::tcl_traceCompile in tcl script

Alexandre Ferrieux

unread,
May 22, 2007, 5:31:20 PM5/22/07
to

Reread my answer. There is a question and a big If.
Last time I checked, .tbc's were only created by the non-free TclPro.
If you want to help, tell me the current status, and answer the
question of my previous post.

-Alex

Donal K. Fellows

unread,
May 22, 2007, 5:41:13 PM5/22/07
to
Gerald W. Lester wrote:
> To the best of my knowledge no one has a .tbc -> .tcl tool.

They've actually been developed a few times that I'm aware of (well, to
at least the stage where deriving the script isn't too difficult) but
nobody distributes them. Such tools go against the principle of the .tbc
format, since there really isn't any reason to use it for anything other
than information hiding...

Donal.

Bezoar

unread,
May 30, 2007, 4:02:15 PM5/30/07
to

Here's one idea if you can source your tbc file can't your use info
to rebuild your procs?
like so:

foreach p [info procs ] {
puts "proc $p \{ \n[info body $p ] \}"
}


Jeff Hobbs

unread,
May 30, 2007, 6:36:47 PM5/30/07
to Bezoar
Bezoar wrote:
> On May 21, 9:40 am, siswap...@gmail.com wrote:
>> Does any one can write some code in tcl language or other for
>> decompile tcl from bytecodes?
>> I very need it to deobfuscated some tcl that I write & because of my
>> fool I can't get my real codes again! :-( I can't rewrite my codes
>> again from beginning (my code is about 545KB for size).
>> I've been read the tbcload source code but it's in C language (woow it
>> 's too hard for me).
>
> Here's one idea if you can source your tbc file can't your use info
> to rebuild your procs?
> like so:
>
> foreach p [info procs ] {
> puts "proc $p \{ \n[info body $p ] \}"
> }

No, precompiled bytecodes no longer contain their source representation.
The info body will give you nothing useful. This is one thing to be
watchful of if you try and copy procs on the fly for modification as
part of program design (this tripped me up once).

Jeff

yahalom

unread,
May 31, 2007, 1:25:00 AM5/31/07
to
> Jeff- Hide quoted text -
>
> - Show quoted text -

you can use "trace add execution <your proc> enterstep logProcs" if
you remember the procs names and source the tbc file. the in logProcs
write the data into file for later re-costructing. it will be big task
but at least some of the part could be copied from the logging on the
procs.
also info procs can help you remember the proc names.

0 new messages