Oracle Forms10g provides a tool to convert the Oracle Forms modules, from the binary format (.FMB) that Oracle Forms Builder works with, to text format (.FMT).
Oracle Forms10g提供了一个工具,用于将Oracle Forms模块从Oracle Forms Builder使用的二进制格式(.FMB)转换为文本格式(.FMT)。
For example, if you create a module called mymodule.fmb with Oracle Forms Builder, and then invoke
例如,如果使用Oracle Forms Builder创建名为mymodule.fmb的模块,然后调用
frmcmp module=mymodule.fmb script=yes batch=yes logon=no
from the command line, the Oracle Forms Convert utility will create a file named mymodule.fmt from the file mymodule.fmb. This text file is supposed to be "readable" by humans, except for the PL/SQL code of triggers and program units, which is codified.
从命令行,Oracle Forms Convert实用程序将从文件mymodule.fmb创建名为mymodule.fmt的文件。该文本文件应该是人类“可读”的,除了编码的触发器和程序单元的PL / SQL代码。
For example, this is a snippet of a .FMT file with a chunk of codified PL/SQL code
例如,这是一个.FMT文件的片段,其中包含一大块编码的PL / SQL代码
DEFINE F50P
BEGIN
PP = 10
PI = 3
PN = 464
PL = 1138
PV = (BLONG)
<<"
00000049 00800000 00440000 00000000 00000031 0000000d 00000002 a0011519
00002420 0000045e 001f0000 00165030 5f32335f 4f43545f 32303038 31365f33
375f3039 00000006 42454749 4e0a0000 0042676f 5f626c6f 636b2820 27504149
53455327 20293b0a 69662066 6f726d5f 73756363 65737320 7468656e 0a096578
65637574 655f7175 6572793b 0a656e64 2069663b 00000005 0a454e44 3b000000
1d574845 4e2d4e45 572d464f 524d2d49 4e535441 4e434520 28466f72 6d290000
Have you ever tried to decode this kind of files, to be able to extract the PL/SQL code of a form ?
您是否曾尝试解码此类文件,以便能够提取表单的PL / SQL代码?
It would be very useful to be able to search a string in the PL/SQL code of a lot of .FMT files, instead of using Oracle Forms Builder to manually open each of the corresponding .FMB files, and search the string in each one of them.
能够在许多.FMT文件的PL / SQL代码中搜索字符串,而不是使用Oracle Forms Builder手动打开每个相应的.FMB文件,并在每个文件中搜索字符串,这将非常有用。他们
Thanks!
4 个解决方案
#1
5
Along with the API, note that if you're working at the start of this process you'll probably be better off generating the XML version than the FMT version. The FMT is an older format kept for backward compatibility, and tools like the recently announced Forms -> Oracle APEX converter will want the XML. It's also easier to read.
除了API之外,请注意,如果您在此过程开始时工作,那么生成XML版本可能比FMT版本更好。 FMT是为保持向后兼容性而保留的较旧格式,而像最近发布的Forms - > Oracle APEX转换器这样的工具将需要XML。它也更容易阅读。
In "Forms 10g release 1" (9.0.4) the XML converter is a separate command line program. forms2xml. I think that's still true for 10.1
在“Forms 10g release 1”(9.0.4)中,XML转换器是一个单独的命令行程序。 forms2xml。我认为10.1仍然如此
Plus, the XML is easier to read and interpret.
此外,XML更易于阅读和解释。
#2
1
The bytes are just hex values of the characters. for example: taking the 4th line and putting it into the following python code:
字节只是字符的十六进制值。例如:取第4行并将其放入以下python代码中:
[chr(x) for x in [0x53,0x45,0x53,0x27 ,0x20,0x29,0x3b,0x0a ,0x69,0x66,0x20,0x66 ,0x6f,0x72,0x6d,0x5f ,0x73,0x75,0x63,0x63 ,0x65,0x73,0x73,0x20 ,0x74,0x68,0x65,0x6e ,0x0a,0x09,0x65,0x78]]
gives the following output:
给出以下输出:
['S', 'E', 'S', "'", ' ', ')', ';', '\n', 'i', 'f', ' ', 'f', 'o', 'r', 'm', '_', 's', 'u', 'c', 'c', 'e', 's', 's', ' ', 't', 'h', 'e', 'n', '\n', '\t', 'e', 'x']
which is recognisable forms pl/sql. So it looks like it wouldn't be too much work to create a script that would take a directory of FMT files and produce corresponding files with text that could be searched.
Have fun!
这是可识别的形式pl / sql。因此,创建一个可以获取FMT文件目录并生成带有可搜索文本的相应文件的脚本似乎不会太费力。玩得开心!
#3
1
The Oracle Forms 9i and later has an Programming API to allow you to do exactly what you describe. You will need to review your Forms documentation to do this, but it may be faster than trying to extract binary strings.
Oracle Forms 9i及更高版本具有编程API,可以让您完全按照您的描述进行操作。您需要查看Forms文档才能执行此操作,但这可能比尝试提取二进制字符串更快。
If you are willing to pay for an existing tool, use the following:
如果您愿意为现有工具付款,请使用以下命令:
Their formsAPI and FormsTools let you do extractions, diffs, changes and updates to your forms.
他们的FormsAPI和FormsTools允许您对表单进行提取,差异,更改和更新。
#4
0
According to this page the author has a perl script to convert the hex back to ascii text (he says to send him an email and he will send it)
根据这个页面,作者有一个perl脚本将十六进制转换回ascii文本(他说要给他发一封电子邮件,他会发送它)
#1
5
Along with the API, note that if you're working at the start of this process you'll probably be better off generating the XML version than the FMT version. The FMT is an older format kept for backward compatibility, and tools like the recently announced Forms -> Oracle APEX converter will want the XML. It's also easier to read.
除了API之外,请注意,如果您在此过程开始时工作,那么生成XML版本可能比FMT版本更好。 FMT是为保持向后兼容性而保留的较旧格式,而像最近发布的Forms - > Oracle APEX转换器这样的工具将需要XML。它也更容易阅读。
In "Forms 10g release 1" (9.0.4) the XML converter is a separate command line program. forms2xml. I think that's still true for 10.1
在“Forms 10g release 1”(9.0.4)中,XML转换器是一个单独的命令行程序。 forms2xml。我认为10.1仍然如此
Plus, the XML is easier to read and interpret.
此外,XML更易于阅读和解释。
#2
1
The bytes are just hex values of the characters. for example: taking the 4th line and putting it into the following python code:
字节只是字符的十六进制值。例如:取第4行并将其放入以下python代码中:
[chr(x) for x in [0x53,0x45,0x53,0x27 ,0x20,0x29,0x3b,0x0a ,0x69,0x66,0x20,0x66 ,0x6f,0x72,0x6d,0x5f ,0x73,0x75,0x63,0x63 ,0x65,0x73,0x73,0x20 ,0x74,0x68,0x65,0x6e ,0x0a,0x09,0x65,0x78]]
gives the following output:
给出以下输出:
['S', 'E', 'S', "'", ' ', ')', ';', '\n', 'i', 'f', ' ', 'f', 'o', 'r', 'm', '_', 's', 'u', 'c', 'c', 'e', 's', 's', ' ', 't', 'h', 'e', 'n', '\n', '\t', 'e', 'x']
which is recognisable forms pl/sql. So it looks like it wouldn't be too much work to create a script that would take a directory of FMT files and produce corresponding files with text that could be searched.
Have fun!
这是可识别的形式pl / sql。因此,创建一个可以获取FMT文件目录并生成带有可搜索文本的相应文件的脚本似乎不会太费力。玩得开心!
#3
1
The Oracle Forms 9i and later has an Programming API to allow you to do exactly what you describe. You will need to review your Forms documentation to do this, but it may be faster than trying to extract binary strings.
Oracle Forms 9i及更高版本具有编程API,可以让您完全按照您的描述进行操作。您需要查看Forms文档才能执行此操作,但这可能比尝试提取二进制字符串更快。
If you are willing to pay for an existing tool, use the following:
如果您愿意为现有工具付款,请使用以下命令:
Their formsAPI and FormsTools let you do extractions, diffs, changes and updates to your forms.
他们的FormsAPI和FormsTools允许您对表单进行提取,差异,更改和更新。
#4
0
According to this page the author has a perl script to convert the hex back to ascii text (he says to send him an email and he will send it)
根据这个页面,作者有一个perl脚本将十六进制转换回ascii文本(他说要给他发一封电子邮件,他会发送它)