This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() { | |
printf("hello world"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String[] args) { | |
System.out.println("Addition : " + addition(30, 6)); | |
System.out.println("Subtraction : " + subtraction(30, 6)); | |
System.out.println("Multiplication : " + multiplication(30, 6)); | |
System.out.println("Division : " + division(30, 6)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javassist.ClassPool; | |
import javassist.CtClass; | |
import javassist.CtMethod; | |
import java.lang.instrument.ClassFileTransformer; | |
import java.lang.instrument.IllegalClassFormatException; | |
import java.lang.instrument.Instrumentation; | |
import java.security.ProtectionDomain; | |
public class JavaAgent { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; "> | |
<script | |
src="https://code.jquery.com/jquery-3.4.1.min.js" crossorigin="anonymous" | |
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="> | |
</script> <!-- Load jquery from their CDN --> | |
<script> alert('hello'); // inline script </script> | |
</head> | |
<body></body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ByteBuddyExampleMain { | |
public static void main(String[] args) throws Exception { | |
String returnVal = (new Robot()).greetUser("John"); | |
System.out.println("return value: " + returnVal); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Robot { | |
private String name = "Casper"; | |
public String greetUser(String name ){ | |
System.out.println("Inside greetUser method . . . "); | |
return "Hello " + name + "! I am " + this.name; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ByteBuddyExampleMain { | |
public static void main(String[] args) throws Exception { | |
Class<?> type = new ByteBuddy() | |
.redefine(Robot.class) | |
.visit(Advice.to(MyAdvices.class).on(ElementMatchers.isMethod())) | |
.make() | |
.load(ClassLoadingStrategy.BOOTSTRAP_LOADER, ClassLoadingStrategy.Default.WRAPPER) | |
.getLoaded(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyAdvices { | |
@Advice.OnMethodEnter(suppress = Throwable.class) | |
static long enter(@Advice.This Object thisObject, | |
@Advice.Origin String origin, | |
@Advice.Origin("#t #m") String detaildOrigin, | |
@Advice.AllArguments Object[] ary, | |
@Advice.FieldValue(value = "name", readOnly = false) String nameField){ | |
System.out.println("Inside enter method . . . "); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: keycloak-service | |
namespace: keycloak | |
spec: | |
ports: | |
- name: httpPort | |
port: 8080 | |
targetPort: 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: headless-kc-service | |
namespace: keycloak | |
spec: | |
clusterIP: None | |
selector: | |
app: keycloak-deployment |
OlderNewer