This file contains hidden or 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
| package poc; | |
| import java.awt.MouseInfo; | |
| import java.awt.Point; | |
| import java.awt.Robot; | |
| import java.awt.Toolkit; | |
| import java.time.Duration; | |
| import java.time.LocalDateTime; | |
| /** |
This file contains hidden or 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 java.io.IOException; | |
| import java.sql.Connection; | |
| import java.sql.PreparedStatement; | |
| import java.sql.SQLException; | |
| import java.time.Duration; | |
| import javax.sql.DataSource; | |
| import com.mageddo.db.StmUtils; |
This file contains hidden or 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
| Stream.of( | |
| new AbstractMap.SimpleEntry<>("Apple", 1), | |
| new AbstractMap.SimpleEntry<>("Orange", 1), | |
| new AbstractMap.SimpleEntry<>("Orange", 1), | |
| new AbstractMap.SimpleEntry<>("Grape", 1), | |
| new AbstractMap.SimpleEntry<>("Grape", 1), | |
| new AbstractMap.SimpleEntry<>("Grape", 1) | |
| ) |
This file contains hidden or 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
| plugins { | |
| id 'net.researchgate.release' version '2.8.1' | |
| } | |
| release { | |
| project.ext.set("release.useAutomaticVersion", true) | |
| git { | |
| requireBranch = '' | |
| } | |
| failOnCommitNeeded = false |
This file contains hidden or 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
| version: '3' | |
| services: | |
| agent: | |
| image: portainer/agent:1.3.0 | |
| environment: | |
| AGENT_CLUSTER_ADDR: tasks.agent | |
| # AGENT_PORT: 9001 | |
| # LOG_LEVEL: debug | |
| volumes: | |
| - /var/run/docker.sock:/var/run/docker.sock |
This file contains hidden or 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
| package testing; | |
| import java.io.ByteArrayOutputStream; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.OutputStream; | |
| import java.io.UncheckedIOException; | |
| /** | |
| * Some utilities while testing |
This file contains hidden or 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
| package testing; | |
| import java.io.ByteArrayOutputStream; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.OutputStream; | |
| import java.io.UncheckedIOException; | |
| /** | |
| * Some utilities while testing |
This file contains hidden or 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 <jvmti.h> | |
| #include <cstring> | |
| #include <iostream> | |
| void debug(char* msg...){ | |
| // printf(msg); | |
| } | |
| int loadJar(JNIEnv *jni){ |
This file contains hidden or 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
| JNIEnv *jni; | |
| // class and method finding | |
| jclass clazz = jni->FindClass("java/lang/String"); | |
| jmethodID method = jni->GetStaticMethodID(clazz, "valueOf", "(Ljava/lang/Object;)Ljava/lang/String;"); | |
| if(method == NULL){ | |
| jni->FatalError("Class method not found\n"); | |
| } | |
| // method execution |
This file contains hidden or 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
| /** | |
| * JVM Tool Interface agent which sets | |
| * security policy when is agent loaded | |
| * @author Jan Kalina <[email protected]> | |
| */ | |
| #include <string.h> | |
| #include <jvmti.h> | |
| #include <jni.h> |