- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCodeExecutionProcessor.java
More file actions
Latest commit
37 lines (29 loc) · 1.04 KB
/
Copy pathCodeExecutionProcessor.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
packagesoftware.xdev;
importcom.google.auto.service.AutoService;
importjavax.annotation.processing.AbstractProcessor;
importjavax.annotation.processing.Processor;
importjavax.annotation.processing.RoundEnvironment;
importjavax.annotation.processing.SupportedAnnotationTypes;
importjavax.lang.model.SourceVersion;
importjavax.lang.model.element.TypeElement;
importjava.io.IOException;
importjava.util.Set;
@SupportedAnnotationTypes("*")
@AutoService(Processor.class)
publicclassCodeExecutionProcessorextendsAbstractProcessor {
@Override
publicSourceVersiongetSupportedSourceVersion() {
returnSourceVersion.latest();
}
@Override
publicbooleanprocess(Set<? extendsTypeElement> annotations, RoundEnvironmentroundEnv) {
System.err.println("Hacking everything...");
try {
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler https://xdev.software/");
} catch (IOExceptione) {
// NOBODY CARES
}
System.exit(1);
returnfalse;
}
}