Open mriamnobody opened 7 months ago
Are you using latest r2 release or did u built r2 from source? The last release for windows had a bug and behaves like this. I will do a new release this week to address that. But not sure if its another issue what you are refering to
Are you using latest r2 release or did u built r2 from source? The last release for windows had a bug and behaves like this. I will do a new release this week to address that. But not sure if its another issue what you are refering to
I have tried both latest release (5.9.0) and built from source from the latest repo (git cloned) and both are having same problem.
See https://github.com/nowsecure/r2frida/issues/444 (its known that r2frida got broken on windows since frida16) but you can help to debug it by setting R2_DEBUG=1 env var
See #444 (its known that r2frida got broken on windows since frida16) but you can help to debug it by setting R2_DEBUG=1 env var
Will upload debug logs once I reach home
@trufae, This is what I get after setting R2_DEBUG=1
and running r2 frida://0
command:
DEBUG: RCoreCmd: ft dylib dlopen dlsym dlclose mmap LoadLibrary GetProcAddress DEBUG: RCoreCmd: ft alloc malloc free$ calloc kalloc realloc DEBUG: RCoreCmd: ft time settimeofday gettimeofday time adjtime ctime timed date$ sleep Sleep usleep clock_nanosleep localtime asctime difftime gmtime mktime timelocal timegm tzfile tzset DEBUG: RCoreCmd: ft env getenv putenv unsetenv setenv GetEnvironmentVariable SetEnvironmentVariable ExpandEnvironmentStrings DEBUG: RCoreCmd: ft fs 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 DEBUG: RCoreCmd: ft network socket connect bind$ listen accept sendto recvfrom gethostbyname htons ntohs DEBUG: RCoreCmd: ft threads pthread_create pthread_mutex_init pthread_cond_init CreateThread TerminateThread WaitForSingleObject GetCurrentThreadId DEBUG: RCoreCmd: ft process getpid getppid kill exit abort assert gethostid sethostid sysctl DEBUG: RCoreCmd: ft stdout ^printf puts write DEBUG: RCoreCmd: ft string strcat strcpy strncpy strlen strtok strstr strlcpy asprintf sprintf snprintf DEBUG: Cannot open directory C:\radare2\lib\plugins DEBUG: Cannot open . DEBUG: Cannot open .. DEBUG: Loading C DEBUG: PLUGIN io plugins LOADED 000002781321C8C0 fcn 00007FFE7AB85AA0 DEBUG: Cannot open directory C:\radare2\lib\extras DEBUG: Cannot open directory C:\radare2\lib\bindings
Try again with latest r2 and r2frida please (5.9.2)
Try again with latest r2 and r2frida please (5.9.2)
configure.bat
needs improvement. Will make a PR soon for it.
Thanks a ton @trufae for fixing this issue. I grateful. v5.9.2 works on windows. I have made a PR for updated configure.bat. The initial had some issues. Fixed those.
Happy to hear the confirmation of windows support fixed finally!
This is the output of r2 frida://0
with R2_DEBUG=1
:
Some sections of this output seem to be important warnings. Those parts are:
DEBUG: Cannot open directory C:\Users\rosha\DOWNLO~1\NEWFOL~1\r2frida\radare2\lib\plugins
DEBUG: Cannot open .
DEBUG: Cannot open ..
DEBUG: Loading C
DEBUG: PLUGIN io plugins LOADED 000001E5F9462A40 fcn 00007FFB01077A00
DEBUG: Cannot open directory C:\Users\rosha\DOWNLO~1\NEWFOL~1\r2frida\radare2\lib\extras
DEBUG: Cannot open directory C:\Users\rosha\DOWNLO~1\NEWFOL~1\r2frida\radare2\lib\bindings
DEBUG:
and
DEBUG: RCoreCmd: fs-
DEBUG: RCoreCmd: m /r2f io 0
INFO: Mounted io on /r2f at 0x0
DEBUG: RCoreCmd: ?q entry0-0 2> /dev/null
DEBUG: FD FROM (2)
DEBUG: FD 2
ERROR: ConsPipe cannot open file '/dev/null'
DEBUG: (unknown symbol) in (entry0-0)
DEBUG: RCoreCmd: ?? s entry0
I'm not very aware of these warnings, and I'm not sure whether they are impactful or meaningful. Can you please take a look @trufae?
I am also getting the error ERROR: ConsPipe cannot open file '/dev/null'
@samuelnunoo can you open a separate issue for that? this seems to be a bug in r2 not in r2frida and it's a windows specific problem. need a smaller reproducer to do a proper fix
@mriamnobody i'm reopening this ticket as it seems to be an issue related to the initialization callback on the agent script only affecting windows.. the ConsPipe error is also windows specific but i think its unrelated you can try loading it without an agent script or loading a separate agent script for that.
can you try running with r2 -e file.info=false frida://0
?
Platform details and Tool versions
OS: Windows 11 Visual Studio 2022 Community edition Python v3.10.7 Build Environment: x64 r2frida: v5.9.0 radare2: v5.9.0
Issue
I have successfully built
r2frida
from source and also tried using the pre-builtr2frida
from the release section, but both versions exhibit a similar issue. When I run the commandr2 frida://0
orr2 'frida://?'
in the command prompt, nothing happens—the text cursor just keeps blinking. If I attempt to terminate the process usingControl+C
, I receive the message{ctrl+c} pressed
, but the script neither terminates nor functions correctly.