More improvements in the current flagtags and ftl->ftw ##flags

This commit is contained in:
radare 2019-04-19 16:54:53 +02:00 committed by GitHub
parent 3f9cf702a2
commit aaf93c20d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 80 additions and 5 deletions

View File

@ -243,12 +243,12 @@ static void cmd_flag_tags (RCore *core, const char *input) {
eprintf (" ft tag strcpy strlen ... # set words for the 'string' tag\n");
eprintf (" ft tag # get offsets of all matching flags\n");
eprintf (" ft # list all tags\n");
eprintf (" ftl # list all tags and the associated flags\n");
eprintf (" ftn tag # get matching flagnames fot given tag\n");
eprintf (" ftw # flag tags within this file\n");
free (inp);
return;
}
if (mode == 'l') {
if (mode == 'w') { // "ftw"
const char *tag;
RListIter *iter;
RList *list = r_flag_tags_list (core->flags);

View File

@ -1,5 +1,5 @@
malloc
free
free$
calloc
kalloc
realloc

9
libr/flag/d/crypto Normal file
View File

@ -0,0 +1,9 @@
encrypt
decrypt
aes
AES
blowfish
_des
_rc2
serpent
_cbc

View File

@ -1,4 +1,33 @@
open
open$
close
read$
write
CloseHandle
FindFirstFileW
_wfopen
_wstat
ftruncate
lseek
_chsize
GetFullPathName
realpath
RemoveDirectory
DeleteFile
CreateFile
WriteFile
UnmapViewOfFile
CreateFileMapping
MapViewOfFile
readlink
chmod
fchmod
chown
stat
fstat
lstat
fstatat
lstat64
stat64
chflags
fchflags
lchflags

View File

@ -1,9 +1,11 @@
tags_r2_sources = [
'dylib',
'alloc',
'time',
'env',
'fs',
'network',
'threads',
'process',
'stdout',
'string'

View File

@ -1,5 +1,9 @@
getpid
getppid
kill
exit
abort
assert
gethostid
sethostid
sysctl

View File

@ -1,2 +1,3 @@
printf
^printf
puts
write

7
libr/flag/d/threads Normal file
View File

@ -0,0 +1,7 @@
pthread_create
pthread_mutex_init
pthread_cond_init
CreateThread
TerminateThread
WaitForSingleObject
GetCurrentThreadId

20
libr/flag/d/time Normal file
View File

@ -0,0 +1,20 @@
settimeofday
gettimeofday
time
adjtime
ctime
timed
date$
sleep
Sleep
usleep
clock_nanosleep
localtime
asctime
difftime
gmtime
mktime
timelocal
timegm
tzfile
tzset

View File

@ -763,6 +763,9 @@ R_API int r_file_mmap_read (const char *file, ut64 addr, ut8 *buf, int len) {
goto err_r_file_mmap_read;
}
ut8 *obuf = MapViewOfFile (fm, FILE_MAP_READ, 0, 0, len);
if (!obuf) {
goto err_r_file_mmap_read;
}
memcpy (obuf, buf, len);
UnmapViewOfFile (obuf);
ret = len;