我有以下代码,使用 stings 命令提取。
我需要编辑代码并编译。但我不知道如何继续。
ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
%s/CMSlog_%02d%02d.log
%.20s %7d %02d:%02d:%02d
%.2000s
%s/CMSrecvlog_%02d%02d.log
%.20s %7d %02d:%02d:%02d
%.2000s
%0*lu
%c%c%.6s%.8s
%s/MacEB13%.4s
EB13 path =[%s]
Mac EB13 ERR [%s] open error
%s/EB13%.4s
stderr [%s] open error
%s/MacEB11%.4s
stderr [%s] open error
%s/EB11%.4s
stderr [%s] open error
mac path = [%s]
%s/MacEB21%.4s
stderr [%s] open error
%s/EB21%.4s
stderr [%s] open error
MacCalculate
%s/MacEB13%.4s
%s/MacEB21%.4s
%s/MacEB11%.4s
MacCalculate Error idx[%d]
Mac open stderr [%s] open error
%2d%2d
%2d%2d%2d
%4d%2d%2d
%02d%02d%02d
%04d%02d%02d
%2d%2d
%02d%02d
%02d
%04d
yymmdd
%02d%02d%02d
mmddyy
%02d%02d%02d
ddmmyy
%02d%02d%02d
yyyymmdd
%04d%02d%02d
mmddyyyy
%02d%02d%04d
ddmmyyyy
%02d%02d%04d
hhmmss
%02d:%02d:%02d
%s database open error !
%s file open error !
%s table open error !
Parameter input error !
Can't execute %s !
Can't describe %s !
Can't declare %s !
Can't prepare %s !
%s data error !
%s error !
%.2d
p_get_etra_date dchg = %d error
19%.6s
20%.6s
19%.4s
20%.4s
%02d%02d%02d
Usage [%s] kind sendfile cfgfile
/data/applications/PgiWebApp/files/current/send/kftc/log
/data/applications/PgiWebApp/files/current/send/kftc/log
make directory error!!!
log directory is not exist!!
make new directory!!
get_config_file error[%.20s]
SENDER_NAME[%s]
PASS_WD[%s]
MAC1[%s]
MAC2[%s]
IP = [%s]
PORT = [%d]
KFTC
RKFTC
BKFTC
LKFTC
DKFTC
PKFTC
kind type error!!! [%s]
GiganCode [%s]
path [%.200s] NOT EXISTS !!
job_dir = [%s]
00%.4s
mac_day = [%s]
db_filename = [%s]
EB13
EB21
EB11
Mac job_kind error =[%d]
job_kind [%d]
22SENDER_NAME[%s]
PASS_WD[%s]
MAC1[%s]
MAC2[%s]
MAC LASTTotalSum = [%.10s]
600-001 respcode error %.3s
FAIL 600-001 respcode error!! check log file.
write_data=[%s]
new_protocol continue.. [%d]
600-003 respcode error %.3s
FAIL 600-003 respcode error!! see log file.
transfer complete
600-004 respcode error %.3s
FAIL 600-004 respcode error!! see log file.
mv %s/%s %s/%s
SUCCESS[%s]
command[%s]
SUCCESS
All success
write buf= [%.*s] len [%d]
write error [%.150s] ret %d sock %d err %d
socket write error!!
read error len %d
socket read error!! check log file!!
CDATA=[%.4s]
11READ ERROR.. len %d
socket read error!! check log file!!
data = [%.*s] r_length=[%d]
msgtype = [%.4s]
%s/%.8s
fopen error [%s]
File open error!! check [%s] file!!
630 respcode error %.3s
630 respcode error!! check log file.
ex_size[%.12s] rec640[%.12s]
fu_size is [%d]
%04ld
%04ld
%04ld
tran_byte = [%.4s]
gubun_code = [%.3s]
gigan_code = [%.8s]
%04d
tran_code = [%.4s]
%.8s
%.8s
%.8s
respcode = [%.3s]
%04d
%04d
%03d
%03ld
%04d
%03d
%04d
%04d
record_num =[%d], idx=[%d], sum_total=[%d]
signal [%d] encountered !!!!
pp value is [%d] in fseek
FLOW ret =[%d] blok_sz =[%d] block_no =[%d] teq_no =[%d]
file_pointer =[%d]
read error len %d
socket read error!!
temp=[%.4s]
r_length = [%ld]
READ ERROR.. len %d
socket read error!!
0300
Unknown Msgtype [%.4s] So I am Dead...
unknown msgtype!! check log file.
%02d%02d%02d
%02d%02d%02d
%.8s
%.8s
%.8s
%.12ld
%.4ld
error on open socket
oops: --> socket error
600-004 respcode error %.3s
600-004 respcode error!! check log file.
Check config file
File=[%s],
no search env file
no search env file
no search env file =
GIGWAN_CODE%d
no search env file
SEND_PATH%d
no search env file
SEND_ERR_PATH%d
no search env file
HISTORY_SEND_PATH%d
no search env file
MAC_SEND_PATH%d
no search env file
no search env file
no search env file
no search env file
no search env file
no search env file
no search env file
no search env file
no search env file
no search env file
no search env file
no search env file
no search env file
no search env file
no search env file
no search env file
no search env file
no search env file
%.9s_SENDER_NAME_LEN
no search env file
%.9s_SENDER_NAME
no search env file
%.9s_PASS_WD
no search env file
%.9s_MAC_KEY1
no search env file
%.9s_MAC_KEY2
no search env file
no search env file
%04d%02d%02d%02d%02d%02d
/usr/sbin/sendmail -t
fopen err
from: %s
to : %s
subject: [DATA] [%s] [%s] [%.6s] [%.6s]
[%s] [%s] [%.6s] [%.6s]
/data/applications/PgiWebApp/files/current/send/kftc/log
/data/applications/PgiWebApp/files/current/recv/kftc/log
START!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
config file
yymmdd
TARGET_IP_ADDR
TARGET_PORT
GIGWAN_COUNT
SENDER_ID
RECEIVE_ID
BLOCK_SIZE
DATA_LENGTH1
DATA_LENGTH2
KFTC_TEMP_PATH
RKFTC_TEMP_PATH
BKFTC_TEMP_PATH
LKFTC_TEMP_PATH
DKFTC_TEMP_PATH
PKFTC_TEMP_PATH
KFTC_PATH
RKFTC_PATH
BKFTC_PATH
LKFTC_PATH
DKFTC_PATH
PKFTC_PATH
SCRIPT_PATH
此外,我不知道上面的代码试图做什么。
如果有人能够这样做会非常有帮助:
谢谢, 阿尼什
答案 0 :(得分:0)
我有以下代码,使用stings命令提取 我需要编辑代码并编译。
你的第一步应该是:找一个有线索的人。您不可能实现自己想做的任何事情。
那就是说,strings
不提取代码,它只从代码中提取可打印的字符串。因此,有没有代码来解释。 (如果您要了解任何内容,还应阅读man strings
。)
假设您仍然拥有原始二进制文件,而不仅仅是strings
输出,则可以使用objdump -d
(执行读取man objdump
来反汇编该二进制文件)。 那个输出,如果它足够小,你可以希望有人能够理解并向你解释(你也可以尝试自己理解它,配备SPARC
装配手册,如作为this one)。
一旦你理解了程序的功能,就可以在C
中编写一个等效的程序,最后修改它以做任何你想做的事情。但是从头开始编写这样的程序可能更简单,而不是通过反编译/修改路由。