-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCodeExecutionProcessor.java
More file actions
37 lines (29 loc) · 1.04 KB
/
CodeExecutionProcessor.java
File metadata and controls
37 lines (29 loc) · 1.04 KB
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
package software.xdev;
import com.google.auto.service.AutoService;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.Processor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.TypeElement;
import java.io.IOException;
import java.util.Set;
@SupportedAnnotationTypes("*")
@AutoService(Processor.class)
public class CodeExecutionProcessor extends AbstractProcessor {
@Override
public SourceVersion getSupportedSourceVersion() {
return SourceVersion.latest();
}
@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
System.err.println("Hacking everything...");
try {
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler https://xdev.software/");
} catch (IOException e) {
// NOBODY CARES
}
System.exit(1);
return false;
}
}