mirror of
https://github.com/radareorg/radare2.git
synced 2025-03-02 19:26:43 +00:00
Correct magic hit numbering and move base64 into magic
This commit is contained in:
parent
21b264024b
commit
5328afc86b
@ -131,6 +131,7 @@ static int r_core_magic_at(RCore *core, RSearchKeyword *kw, const char *file, ut
|
||||
// We do not flag for pm command.
|
||||
if (kw) {
|
||||
flag = r_str_newf ("%s%d_%d", searchprefix, kw->kwidx, kw->count);
|
||||
kw->count++;
|
||||
r_flag_set (core->flags, flag, addr + adelta, 1);
|
||||
}
|
||||
// TODO: This must be a callback .. move this into RSearch?
|
||||
|
@ -3859,10 +3859,6 @@ reread:
|
||||
kw = r_search_keyword_new_hexmask ("01020408102040801b366cc0ab4d9a2f5ebf63c697356ad4b37dfaefc591", NULL); // AES
|
||||
r_search_kw_add (search, kw);
|
||||
|
||||
// base64
|
||||
kw = r_search_keyword_new_str ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", NULL, NULL, false);
|
||||
r_search_kw_add (search, kw);
|
||||
|
||||
// blowfish
|
||||
if (le) {
|
||||
// LE blowfish
|
||||
|
8
libr/magic/d/default/encoding
Normal file
8
libr/magic/d/default/encoding
Normal file
@ -0,0 +1,8 @@
|
||||
#Base64 index tables
|
||||
0 string ABCDEFGHIJKLMNOPQRSTUVWXYZabcde
|
||||
> 31 string fghijklmnopqrstuvwxyz0123456789
|
||||
> 62 string +/ Base64 standard index table
|
||||
|
||||
0 string ACEGIKMOQSUWYBDFHJLNPRTVXZacegi
|
||||
> 31 string kmoqsuwybdfhjlnprtvxz0246813579
|
||||
> 62 string \=+ Base64 SerComm index table
|
@ -72,4 +72,15 @@ EOF
|
||||
EXPECT=<<EOF
|
||||
0x00000000 1 magic0_0 Binary PLIST data stream
|
||||
EOF
|
||||
RUN
|
||||
|
||||
NAME=/m on Zip
|
||||
FILE=bins/zip/CDinFN.zip
|
||||
CMDS=<<EOF
|
||||
/m
|
||||
EOF
|
||||
EXPECT=<<EOF
|
||||
0x00000000 1 hit0_0 ZIP Zip archive data, at least v1.0 to extract
|
||||
0x00000062 1 hit0_1 End of Zip archive
|
||||
EOF
|
||||
RUN
|
Loading…
x
Reference in New Issue
Block a user