Home > Archive > Tcl > May 2007 > .tbc decompiler!
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| siswaplus@gmail.com 2007-05-21, 7:10 pm |
| 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 2007-05-21, 10:09 pm |
| siswaplus@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.
--
+--------------------------------+---------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
| |
| Alexandre Ferrieux 2007-05-22, 8:08 am |
| On May 22, 1:25 am, "Gerald W. Lester" <Gerald.Les...@cox.net> wrote:
> siswap...@gmail.com wrote:
>
>
> 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
| |
| siswaplus@gmail.com 2007-05-22, 7:12 pm |
| On May 22, 3:41 pm, Alexandre Ferrieux <alexandre.ferri...@gmail.com>
wrote:
> On May 22, 1:25 am, "Gerald W. Lester" <Gerald.Les...@cox.net> wrote:
>
>
>
>
> 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
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
| |
| siswaplus@gmail.com 2007-05-22, 7:12 pm |
| On May 22, 3:41 pm, Alexandre Ferrieux <alexandre.ferri...@gmail.com>
wrote:
> On May 22, 1:25 am, "Gerald W. Lester" <Gerald.Les...@cox.net> wrote:
>
>
>
>
> 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
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
| |
| Alexandre Ferrieux 2007-05-22, 7:12 pm |
| On May 22, 6:33 pm, siswap...@gmail.com wrote:
> 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...
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 2007-05-22, 7:12 pm |
| 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 2007-05-30, 7:10 pm |
| On May 21, 9:40 am, 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...
>
> ---
> ZEXEL
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 2007-05-30, 7:10 pm |
| Bezoar wrote:
> On May 21, 9:40 am, siswap...@gmail.com wrote:
>
> 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 2007-05-31, 8:08 am |
| On May 31, 3:36 am, Jeff Hobbs <j...@activestate.com> wrote:
> Bezoar wrote:
>
>
>
> 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- 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.
|
|
|
|
|