15 #include <sys/types.h>
17 #if __APPLE__ && HAVE_FORK
20 #include <mach/exception_types.h>
21 #include <mach/mach_init.h>
22 #include <mach/mach_port.h>
23 #include <mach/mach_traps.h>
24 #include <mach/task.h>
25 #include <mach/task_info.h>
26 #include <mach/thread_act.h>
27 #include <mach/thread_info.h>
28 #include <mach/vm_map.h>
29 #include <mach-o/loader.h>
30 #include <mach-o/nlist.h>
33 #if HAVE_OPENPTY && HAVE_FORKPTY && HAVE_LOGIN_TTY
34 #if defined(__APPLE__) || defined(__NetBSD__) || defined(__OpenBSD__)
36 #elif defined(__FreeBSD__) || defined(__DragonFly__)
45 #include <sys/ioctl.h>
46 #include <sys/resource.h>
50 #include <sys/filio.h>
52 #if __linux__ && !__ANDROID__
53 #include <sys/personality.h>
55 #if defined(__FreeBSD__) || defined(__DragonFly__)
56 #if HAVE_DECL_PROCCTL_ASLR_CTL
57 #include <sys/procctl.h>
59 #include <sys/sysctl.h>
68 #if HAVE_OPENPTY && HAVE_FORKPTY && HAVE_LOGIN_TTY
70 static int (*dyn_login_tty)(
int fd) =
NULL;
72 static void dyn_init(
void) {
112 if ((o = strchr(
p,
'\n'))) {
127 free(
r->_runlib_fcn);
141 static void set_limit(
int n,
int a,
ut64 b) {
143 struct rlimit cl = {
b,
b };
144 setrlimit(RLIMIT_CORE, &cl);
146 struct rlimit cl = { 0, 0 };
163 if (ret[
len] ==
'\'') {
178 if (ret[
len] ==
'"') {
189 char *pat = strchr(
src + 1,
'@');
194 rep = strtol(
src + 1,
NULL, 10);
199 for (
i = 0;
i < rep;
i++) {
211 int msg_len = strlen(
msg);
213 msg[msg_len - 1] = 0;
239 eprintf(
"Invalid hexpair string\n");
248 return (strcmp(
e,
"yes") ? (strcmp(
e,
"on") ? (strcmp(
e,
"true") ? (strcmp(
e,
"1") ? 0 : 1) : 1) : 1) : 1);
255 #if HAVE_DECL_ADDR_NO_RANDOMIZE && !__ANDROID__
259 #if HAVE_DECL_ADDR_NO_RANDOMIZE && !__ANDROID__
265 const char *argv0 =
r->_system ?
r->_system
266 :
r->_program ?
r->_program
267 :
r->_args[0] ?
r->_args[0]
269 eprintf(
"To disable aslr patch mach0.hdr.flags with:\n"
270 "rizin -qwnc 'wx 000000 @ 0x18' %s\n",
276 #elif __FreeBSD__ || __NetBSD__ || __DragonFly__
278 #if HAVE_DECL_PROCCTL_ASLR_CTL
279 int disabled = PROC_ASLR_FORCE_DISABLE;
280 if (procctl(P_PID, getpid(), PROC_ASLR_CTL, &disabled) == -1) {
291 #if HAVE_OPENPTY && HAVE_FORKPTY && HAVE_LOGIN_TTY
292 static void restore_saved_fd(
int saved,
bool restore,
int fd) {
304 #if HAVE_OPENPTY && HAVE_FORKPTY && HAVE_LOGIN_TTY
312 if (saved_stdin == -1) {
316 if (saved_stdout == -1) {
327 const char *tn = ttyname(fdm);
333 int fds = open(tn,
O_RDWR);
380 #pragma message("TODO: handle_redirection_proc: Not implemented for this platform")
382 #warning handle_redirection_proc : unimplemented for this platform
403 size_t cmdl = strlen(
cmd) - 2;
404 if (
write(pipes[1],
cmd + 1, cmdl) != cmdl) {
405 eprintf(
"[ERROR] rz-run: Cannot write to the pipe\n");
409 if (
write(pipes[1],
"\n", 1) != 1) {
410 eprintf(
"[ERROR] rz-run: Cannot write to the pipe\n");
419 eprintf(
"[ERROR] rz-run: Cannot create pipe\n");
424 #pragma message("string redirection handle not yet done")
426 #warning quoted string redirection handle not yet done
429 }
else if (
cmd[0] ==
'!') {
434 int f, flag = 0,
mode = 0;
439 mode = _S_IREAD | _S_IWRITE;
441 mode = S_IRUSR | S_IWUSR;
445 eprintf(
"[ERROR] rz-run: Cannot open: %s\n",
cmd);
480 int must_free =
false;
481 char *
e = strchr(
b,
'=');
482 if (!
e || *
b ==
'#') {
493 if (!strcmp(
b,
"program")) {
495 }
else if (!strcmp(
b,
"daemon")) {
497 }
else if (!strcmp(
b,
"system")) {
499 }
else if (!strcmp(
b,
"runlib")) {
501 }
else if (!strcmp(
b,
"runlib.fcn")) {
503 }
else if (!strcmp(
b,
"aslr")) {
505 }
else if (!strcmp(
b,
"pid")) {
507 }
else if (!strcmp(
b,
"pidfile")) {
509 }
else if (!strcmp(
b,
"connect")) {
511 }
else if (!strcmp(
b,
"listen")) {
513 }
else if (!strcmp(
b,
"pty")) {
515 }
else if (!strcmp(
b,
"stdio")) {
523 }
else if (!strcmp(
b,
"stdout")) {
525 }
else if (!strcmp(
b,
"stdin")) {
527 }
else if (!strcmp(
b,
"stderr")) {
529 }
else if (!strcmp(
b,
"input")) {
531 }
else if (!strcmp(
b,
"chdir")) {
533 }
else if (!strcmp(
b,
"core")) {
535 }
else if (!strcmp(
b,
"fork")) {
537 }
else if (!strcmp(
b,
"sleep")) {
538 p->_rzsleep = atoi(
e);
539 }
else if (!strcmp(
b,
"maxstack")) {
540 p->_maxstack = atoi(
e);
541 }
else if (!strcmp(
b,
"maxproc")) {
542 p->_maxproc = atoi(
e);
543 }
else if (!strcmp(
b,
"maxfd")) {
545 }
else if (!strcmp(
b,
"bits")) {
547 }
else if (!strcmp(
b,
"chroot")) {
549 }
else if (!strcmp(
b,
"libpath")) {
551 }
else if (!strcmp(
b,
"preload")) {
553 }
else if (!strcmp(
b,
"rzpreload")) {
555 }
else if (!strcmp(
b,
"rzpreweb")) {
557 }
else if (!strcmp(
b,
"setuid")) {
559 }
else if (!strcmp(
b,
"seteuid")) {
561 }
else if (!strcmp(
b,
"setgid")) {
563 }
else if (!strcmp(
b,
"setegid")) {
565 }
else if (!strcmp(
b,
"nice")) {
567 }
else if (!strcmp(
b,
"timeout")) {
568 p->_timeout = atoi(
e);
569 }
else if (!strcmp(
b,
"timeoutsig")) {
571 }
else if (!memcmp(
b,
"arg", 3)) {
577 eprintf(
"Out of bounds args index: %d\n",
n);
579 }
else if (!strcmp(
b,
"envfile")) {
585 if (must_free ==
true) {
597 p = strchr(
buf,
'=');
601 if (
len > 0 &&
p[
len - 1] ==
'\n') {
604 if (
len > 1 &&
p[
len - 2] ==
'\r') {
611 }
else if (!strcmp(
b,
"unsetenv")) {
613 }
else if (!strcmp(
b,
"setenv")) {
614 char *
V, *
v = strchr(
e,
'=');
621 }
else if (!strcmp(
b,
"clearenv")) {
624 if (must_free ==
true) {
631 return "program=/bin/ls\n"
634 "# arg3=\"hello\\nworld\"\n"
635 "# arg4=:048490184058104849\n"
636 "# arg5=:!rz-gg -p n50 -d 10:0x8048123\n"
638 "# arg7=@300@ABCD # 300 chars filled with ABCD pattern\n"
645 "# envfile=environ.txt\n"
647 "# timeoutsig=SIGTERM # or 15\n"
648 "# connect=localhost:8080\n"
654 "# pidfile=/tmp/foo.pid\n"
661 "# #stdio=blah.txt\n"
662 "# #stderr=foo.txt\n"
664 "# stdin=input.txt # or !program to redirect input from another program\n"
665 "# input=input.txt\n"
667 "# chroot=/mnt/chroot\n"
668 "# libpath=$PWD:/tmp/lib\n"
670 "# preload=/lib/libfoo.so\n"
678 #if HAVE_OPENPTY && HAVE_FORKPTY && HAVE_LOGIN_TTY
679 static int fd_forward(
int in_fd,
int out_fd,
char **buff) {
692 eprintf(
"Failed to allocate buffer for redirection");
722 static void *exit_process(
void *user) {
732 #if HAVE_OPENPTY && HAVE_FORKPTY && HAVE_LOGIN_TTY
737 if (!dyn_openpty || (dyn_openpty && dyn_openpty(&fdm, &fds,
NULL,
NULL,
NULL) == -1)) {
738 perror(
"opening pty");
744 if (child_pid == -1) {
751 if (child_pid == 0) {
766 perror(
"select error");
771 if (fd_forward(fdm,
sockfd, &buff) != 0) {
777 if (fd_forward(
sockfd, fdm, &buff) != 0) {
812 #if HAVE_OPENPTY && HAVE_FORKPTY && HAVE_LOGIN_TTY
816 if (!
p->_program && !
p->_system && !
p->_runlib) {
817 eprintf(
"No program, system or runlib rule defined\n");
833 if (
p->_aslr != -1) {
837 set_limit(
p->_docore, RLIMIT_CORE, RLIM_INFINITY);
839 set_limit(
p->_maxfd, RLIMIT_NOFILE,
p->_maxfd);
843 set_limit(
p->_maxproc, RLIMIT_NPROC,
p->_maxproc);
847 set_limit(
p->_maxstack, RLIMIT_STACK,
p->_maxstack);
850 if (
p->_docore ||
p->_maxfd ||
p->_maxproc ||
p->_maxstack)
851 eprintf(
"Warning: setrlimits not supported for this platform\n");
854 char *q = strchr(
p->_connect,
':');
864 eprintf(
"socket redirection failed\n");
872 eprintf(
"Invalid format for connect. missing ':'\n");
878 bool is_child =
false;
880 eprintf(
"rz-run: cannot listen\n");
889 if (
p->_dofork && !
p->_dodebug) {
891 if (child_pid == -1) {
892 eprintf(
"rz-run: cannot fork\n");
896 }
else if (child_pid != 0) {
907 eprintf(
"socket redirection failed\n");
926 if (
p->_rzsleep != 0) {
931 if (
chdir(
p->_chroot) == -1) {
932 eprintf(
"Cannot chdir to chroot in %s\n",
p->_chroot);
936 eprintf(
"Cannot chroot to %s\n",
p->_chroot);
940 if (
chdir(
"/") == -1) {
941 eprintf(
"Cannot chdir to /\n");
945 if (
chdir(
p->_chgdir) == -1) {
946 eprintf(
"Cannot chdir after chroot to %s\n",
p->_chgdir);
952 }
else if (
p->_chgdir) {
953 if (
chdir(
p->_chgdir) == -1) {
954 eprintf(
"Cannot chdir after chroot to %s\n",
p->_chgdir);
978 ret = setuid(atoi(
p->_setuid));
984 ret = seteuid(atoi(
p->_seteuid));
990 ret =
setgid(atoi(
p->_setgid));
1002 eprintf(
"[ERROR] rz-run: Cannot create pipe\n");
1007 size_t inpl = strlen(inp);
1008 if (
write(
f2[1], inp, inpl) != inpl) {
1009 eprintf(
"[ERROR] rz-run: Cannot write to the pipe\n");
1018 if (
p->_rzpreload) {
1020 eprintf(
"WARNING: Only one library can be opened at a time\n");
1028 eprintf(
"rz-run: libpath unsupported for this platform\n");
1031 char *newlib =
rz_str_newf(
"%s:%s",
p->_libpath, orig);
1056 int mypid = getpid();
1058 int use_signal =
p->_timeout_sig;
1059 if (use_signal < 1) {
1063 if (!
kill(mypid, 0)) {
1066 kill(mypid, use_signal);
1070 if (
p->_timeout_sig < 1 ||
p->_timeout_sig == 9) {
1071 rz_th_new(exit_process, (
void *)
p->_timeout);
1073 eprintf(
"timeout with signal not supported for this platform\n");
1087 #if __APPLE__ && HAVE_FORK
1088 posix_spawnattr_t attr = { 0 };
1091 posix_spawnattr_init(&attr);
1095 spflags |= POSIX_SPAWN_SETEXEC;
1096 if (
p->_aslr == 0) {
1097 #define _POSIX_SPAWN_DISABLE_ASLR 0x0100
1098 spflags |= _POSIX_SPAWN_DISABLE_ASLR;
1100 (void)posix_spawnattr_setflags(&attr, spflags);
1104 #if __i386__ || __x86_64__
1106 if (
p->_bits == 64) {
1112 posix_spawnattr_setbinpref_np(
1113 &attr, 1, &
cpu, &copied);
1115 ret = posix_spawnp(&
pid,
p->_args[0],
1116 NULL, &attr,
p->_args, envp);
1121 eprintf(
"posix_spawnp: %s\n", strerror(ret));
1129 eprintf(
"PID: Cannot determine pid with 'system' directive. Use 'program'.\n");
1143 snprintf(pidstr,
sizeof(pidstr),
"%d\n", child);
1145 (
const ut8 *)pidstr,
1153 int mypid = getpid();
1155 int use_signal =
p->_timeout_sig;
1156 if (use_signal < 1) {
1160 if (!
kill(mypid, 0)) {
1163 kill(mypid, use_signal);
1167 eprintf(
"timeout not supported for this platform\n");
1183 eprintf(
"Warning: pidfile doesnt work with 'system'.\n");
1191 if (progpath && *progpath) {
1193 p->_program = progpath;
1196 eprintf(
"rz-run: %s: file not found\n",
p->_program);
1204 for (
i = 3;
i < 1024;
i++) {
1210 int ret =
setgid(atoi(
p->_setgid));
1216 eprintf(
"PID: %d\n", getpid());
1220 snprintf(pidstr,
sizeof(pidstr),
"%d\n", getpid());
1222 (
const ut8 *)pidstr,
1229 if (
nice(
p->_nice) == -1) {
1233 eprintf(
"nice not supported for this platform\n");
1238 eprintf(
"PID: Cannot determine pid with 'system' directive. Use 'program'.\n");
1248 snprintf(pidstr,
sizeof(pidstr),
"%d\n", child);
1250 (
const ut8 *)pidstr,
1266 if (!
p->_runlib_fcn) {
1267 eprintf(
"No function specified. Please set runlib.fcn\n");
1272 eprintf(
"Could not load the library '%s'\n",
p->_runlib);
1277 eprintf(
"Could not find the function '%s'\n",
p->_runlib_fcn);
1302 p->_args[5],
p->_args[6]);
1306 p->_args[5],
p->_args[6],
p->_args[7]);
1310 p->_args[5],
p->_args[6],
p->_args[7],
p->_args[8]);
1314 p->_args[5],
p->_args[6],
p->_args[7],
p->_args[8],
p->_args[9]);
1318 p->_args[5],
p->_args[6],
p->_args[7],
p->_args[8],
p->_args[9],
p->_args[10]);
1321 eprintf(
"Too many arguments.\n");
1336 char *
v = strchr(
k,
'=');
const lzma_allocator const uint8_t * in
const lzma_allocator const uint8_t size_t uint8_t * out
static static fork const void static count static fd const char const char static newpath chdir
static static fork const void static count close
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags cmd
static static sync static getppid static getegid const char static filename ioctl
static static fork const void static count static fd const char const char static newpath const char static path const char static mode static getpid setgid
RZ_API void Ht_() free(HtName_(Ht) *ht)
return memset(p, 0, total)
RZ_API void rz_run_reset(RzRunProfile *p)
static int redirect_socket_to_pty(RzSocket *sock)
static int redirect_socket_to_stdio(RzSocket *sock)
RZ_API void rz_run_free(RzRunProfile *r)
static int handle_redirection(const char *cmd, bool in, bool out, bool err)
RZ_API RzRunProfile * rz_run_new(const char *str)
static char * getstr(const char *src)
static void setASLR(RzRunProfile *r, int enabled)
static int handle_redirection_proc(const char *cmd, bool in, bool out, bool err)
RZ_API const char * rz_run_help(void)
RZ_API bool rz_run_parsefile(RzRunProfile *p, const char *b)
RZ_API bool rz_run_parseline(RzRunProfile *p, const char *b)
RZ_API char * rz_run_get_environ_profile(char **env)
RZ_API int rz_run_start(RzRunProfile *p)
static int parseBool(const char *e)
RZ_API int rz_run_config_env(RzRunProfile *p)
RZ_API bool rz_run_parse(RzRunProfile *pf, const char *profile)
RZ_API RZ_OWN RzThread * rz_th_new(RZ_NONNULL RzThreadFunction function, RZ_NULLABLE void *user)
Creates and starts a new thread.
void * realloc(void *ptr, size_t size)
void * malloc(size_t size)
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf nice
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc kill
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc pid
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc static sig const char static mode static oldfd struct tms static buf static getgid static geteuid const char static filename static arg static mask struct ustat static ubuf static getppid static setsid static egid sigset_t static set struct timeval struct timezone static tz fd_set readfds
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc static sig const char static mode dup
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc static sig const char static mode static oldfd struct tms static buf static getgid static geteuid const char static filename static arg static mask struct ustat static ubuf static getppid static setsid static egid sigset_t static set struct timeval struct timezone static tz select
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
static static fork const void static count static fd const char static mode const char static pathname const char static path const char static dev const char static group static getpid static getuid void void static data static pause const char static mode static sync const char const char static newpath const char static pathname unsigned long static filedes void static end_data_segment static handler static getegid char static len static pgid const char static path dup2
static const char struct stat static buf struct stat static buf static vhangup int struct rusage static rusage struct sysinfo static info unsigned static __unused struct utsname static buf const char static size const char static name static pid personality
static static fork const void static count static fd const char static mode const char static pathname const char static path const char static dev const char static group static getpid static getuid void void static data static pause const char static mode static sync const char const char static newpath const char static pathname unsigned long static filedes void static end_data_segment static handler static getegid char static len static pgid const char static path static newfd static getpgrp static euid const sigset_t static mask const char static len setgroups
static static fork const void static count static fd const char static mode const char static pathname const char static path const char static dev const char static group static getpid static getuid void void static data static pause const char static mode static sync const char const char static newpath const char static pathname unsigned long static filedes void static end_data_segment static handler static getegid char static len static pgid chroot
static const char struct stat static buf struct stat static buf static vhangup int status
#define rz_return_if_fail(expr)
#define rz_return_val_if_fail(expr, val)
RZ_API char * rz_file_binsh(void)
RZ_API bool rz_file_exists(const char *str)
RZ_API RZ_OWN char * rz_file_slurp(const char *str, RZ_NULLABLE size_t *usz)
RZ_API bool rz_file_dump(const char *file, const ut8 *buf, int len, bool append)
RZ_API char * rz_file_path(const char *bin)
RZ_API RZ_OWN char * rz_file_path_join(RZ_NONNULL const char *s1, RZ_NULLABLE const char *s2)
Concatenate two paths to create a new one with s1+s2 with the correct path separator.
RZ_API int rz_hex_str2bin(const char *in, ut8 *out)
Convert an input string in into the binary form in out.
RZ_API void * rz_lib_dl_sym(void *handler, const char *name)
RZ_API void * rz_lib_dl_open(const char *libname)
RZ_API int rz_lib_dl_close(void *handler)
#define RZ_LOG_DEBUG(fmtstr,...)
RZ_API RZ_OWN char * rz_path_libdir(void)
Return the directory where the Rizin libraries are placed.
RZ_API int rz_signal_from_string(const char *str)
#define RZ_RUN_PROFILE_NARGS
RZ_API int rz_socket_close_fd(RzSocket *s)
RZ_API RzSocket * rz_socket_accept(RzSocket *s)
RZ_API bool rz_socket_listen(RzSocket *s, const char *port, const char *certfile)
#define rz_socket_connect_tcp(a, b, c, d)
RZ_API RzSocket * rz_socket_new(bool is_ssl)
RZ_API int rz_socket_free(RzSocket *s)
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
RZ_API RZ_BORROW char * rz_str_trim_tail(RZ_NONNULL char *str)
Removes whitespace characters (space, tab, newline etc.) from the end of a string and replaces them w...
RZ_API char * rz_str_escape_8bit(const char *buf, bool colors, RzStrEscOptions *opt)
RZ_API int rz_str_replace_char(char *s, int a, int b)
RZ_API int rz_str_unescape(char *buf)
RZ_API RZ_OWN char * rz_strbuf_drain(RzStrBuf *sb)
RZ_API RzStrBuf * rz_strbuf_new(const char *s)
RZ_API bool rz_strbuf_appendf(RzStrBuf *sb, const char *fmt,...) RZ_PRINTF_CHECK(2
RZ_API int rz_sys_execv(const char *pathname, char *const argv[])
RZ_API bool rz_sys_aslr(int val)
Enable or disable ASLR for the calling process.
RZ_API char * rz_sys_getenv(const char *key)
Get the value of an environment variable named key or NULL if none exists.
RZ_API int rz_sys_execl(const char *pathname, const char *arg,...)
RZ_API int rz_sys_setenv(const char *key, const char *value)
Set an environment variable in the calling process.
RZ_API int rz_sys_pipe(int pipefd[2], bool close_on_exec)
RZ_API int rz_sys_clearenv(void)
Clean all environment variables in the calling process.
RZ_API int rz_sys_fork(void)
RZ_API int rz_sys_pipe_close(int fd)
RZ_API FILE * rz_sys_fopen(const char *path, const char *mode)
RZ_API int rz_sys_system(const char *command)
RZ_API int RZ_API char * rz_sys_cmd_str(const char *cmd, const char *input, int *len)
RZ_API int rz_sys_sleep(int secs)
Sleep for secs seconds.
RZ_API char ** rz_sys_get_environ(void)
static void rz_run_call8(void *fcn, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6, void *arg7, void *arg8)
static void rz_run_call9(void *fcn, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6, void *arg7, void *arg8, void *arg9)
static void rz_run_call1(void *fcn, void *arg1)
static void rz_run_call6(void *fcn, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6)
static void rz_run_call3(void *fcn, void *arg1, void *arg2, void *arg3)
static void rz_run_call4(void *fcn, void *arg1, void *arg2, void *arg3, void *arg4)
static void rz_run_call5(void *fcn, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5)
static void rz_run_call10(void *fcn, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6, void *arg7, void *arg8, void *arg9, void *arg10)
static void rz_run_call7(void *fcn, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6, void *arg7)
static void rz_run_call2(void *fcn, void *arg1, void *arg2)
static struct sockaddr static addrlen static backlog const void msg
Group together some common options used by string escaping functions.
bool esc_bslash
When true, backslashes \ are quoted with \\
bool show_asciidot
When true, dots . are placed instead of unprintable characters.
#define V(handle, symbol)
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
static const z80_opcode fd[]
int read(izstream &zs, T *x, Items items)