-
-
Save elongl/8b42ab42fe82c4a456f26a571dd5276d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void ping_server(char *ping_ip,int ping_count) | |
{ | |
int ret; | |
char *__format; | |
char ping_count_str [4]; | |
char *ping_cmd; | |
char *ping_count_arg; | |
char *ping_count_arg_str; | |
char *ping_ip_arg; | |
undefined4 null_term_arg; | |
undefined4 local_8; | |
local_8 = 0x1000dc80; | |
sprintf(ping_count_str,"%d",ping_count); | |
ping_cmd = "ping"; | |
ping_count_arg = "-c"; | |
ping_count_arg_str = ping_count_str; | |
null_term_arg = 0; | |
ping_ip_arg = ping_ip; | |
ret = _eval(&ping_cmd,0,10,0); | |
__format = "Fail to ping to server(%s)\n"; | |
if (ret == 0) { | |
__format = "Success to ping to server(%s)\n"; | |
} | |
fprintf(_DAT_000003e4,__format,ping_ip); | |
/* WARNING: Bad instruction - Truncating control flow here */ | |
halt_baddata(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment