h2hell-core

H2H is a component that detects entry points paths in your project.

License

License

Categories

Categories

H2 Data Databases
GroupId

GroupId

com.highway2urhell
ArtifactId

ArtifactId

h2hell-core
Last Version

Last Version

1.0.5
Release Date

Release Date

Type

Type

jar
Description

Description

h2hell-core
H2H is a component that detects entry points paths in your project.

Download h2hell-core

How to add to project

<!-- https://jarcasting.com/artifacts/com.highway2urhell/h2hell-core/ -->
<dependency>
    <groupId>com.highway2urhell</groupId>
    <artifactId>h2hell-core</artifactId>
    <version>1.0.5</version>
</dependency>
// https://jarcasting.com/artifacts/com.highway2urhell/h2hell-core/
implementation 'com.highway2urhell:h2hell-core:1.0.5'
// https://jarcasting.com/artifacts/com.highway2urhell/h2hell-core/
implementation ("com.highway2urhell:h2hell-core:1.0.5")
'com.highway2urhell:h2hell-core:jar:1.0.5'
<dependency org="com.highway2urhell" name="h2hell-core" rev="1.0.5">
  <artifact name="h2hell-core" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.highway2urhell', module='h2hell-core', version='1.0.5')
)
libraryDependencies += "com.highway2urhell" % "h2hell-core" % "1.0.5"
[com.highway2urhell/h2hell-core "1.0.5"]

Dependencies

compile (12)

Group / Artifact Type Version
com.google.code.gson : gson jar 2.2.4
org.apache.activemq : activemq-core jar 5.7.0
org.slf4j : slf4j-api jar 1.7.7
org.slf4j : log4j-over-slf4j jar 1.7.7
org.slf4j : jcl-over-slf4j jar 1.7.7
org.slf4j : jul-to-slf4j jar 1.7.7
ch.qos.logback : logback-classic jar 1.1.2
org.reflections : reflections jar 0.9.10
javax.servlet : javax.servlet-api jar 3.1.0
org.glassfish.jersey.containers : jersey-container-servlet jar 2.8
org.apache.httpcomponents : httpclient jar 4.3.6
org.ow2.asm : asm-all jar 5.0.3

test (7)

Group / Artifact Type Version
com.github.javaparser : javaparser-core jar 2.2.2
org.apache.struts : struts-core jar 1.3.10
org.apache.struts : struts2-core jar 2.3.16.1
springframework : spring jar 1.2.6
junit : junit jar 4.11
org.mockito : mockito-all jar 1.9.5
org.easytesting : fest-assert jar 1.4

Project Modules

There are no modules declared in this project.

highway-to-URhell

Build Status

H2H

H2H is a component that detects entry points paths in your project.

H2H - Java (JVM)

For a JVM (Java virtual machine), H2H is a javagent. This Java agent will scan your application at runtime for each component and framework.

H2H supports (for Java)

  • JSF 2
  • Spring
  • Struts 1
  • Struts 2
  • JEE & JAX-RS
  • RMI server
  • Scan port
  • JMS 1.1
  • ActiveMQ (JMS only)
  • JMS 2.0 (in progress)
  • RestX (in progress)

H2H comes with a webapp that will collect and present all detected entry points in applications that subscribed to H2H service.

Build Java Agent

highway-to-urhell requires Java 6.

You can build it using Maven 3+ :

mvn install

Download the last release

You can download the last release here : https://github.com/highway-to-urhell/highway-to-urhell/releases/download/1.0.4/h2hell-distribution-1.0.4.1.zip

The file config.properties is in the distribution.

How to use it

  • Download the last release on github
  • Unzip highway-to-url distribution in a directory of your choice

Create configuration file : config.properties

The configuration file define the parameter for the agent. Structure of the property file :

timer=REMOTE (if outputSystem is REMOTE)
performance=false||true (false by default)
urlapplication=url of your application reachable for H2H-web
nameapplication=name
urlh2hweb=http://server-h2h-web:port/h2hell-web/api/ThunderApp (only REMOTE)
description=
pathSource=path to source
versionApp=version

You can see example file in h2h-example project.

Configuration via JAVA_OPTS

Configuring agent on Unix machines :

export JAVA_OPTS=$JAVA_OPTS -javaagent:/path_distrib/h2hell-core.jar -Djava.ext.dirs=/path_distrib/ -DH2H_CONFIG=/path_distrib/config.properties -DH2H_PATH=/path_your_application

Configuring agent on Windows machines :

set JAVA_OPTS=%JAVA_OPTS% -javaagent:/path_distrib/h2hell-core.jar -Djava.ext.dirs=/path_distrib/ -DH2H_CONFIG=/path_distrib/config.properties -DH2H_PATH=/path_your_application

Configuration for tomcat

add setenv.sh in your_tomcat\bin\setenv.sh

export JAVA_OPTS="-javaagent:/path_distrib/h2hell-core.jar -Djava.ext.dirs=/path_distrib/ -DH2H_CONFIG=/path_distrib/config.properties -DH2H_PATH=/path_your_application"

Configuration for IBM WAS

  1. Log into the admin console.
  2. Select Servers > Application servers > (selected server).
  3. Select Configuration > Service Infrastructure > Java and Process Management > Process Definition > Additional Properties.
  4. From the Process Definition > Additional Properties, select Java Virtual Machine.
  5. On the Java Virtual Machine page, in the Generic JVM arguments textbox, add the -javaagent and paths.
-javaagent:your_path/h2hell-distribution/h2hell-core.jar -Djava.ext.dirs=your_path/h2hell-distribution/ -DH2H_CONFIG=your_path/h2hell-distribution/config.properties -DH2H_PATH=your_path_tomcat/webapps/your_application/

Select Apply, then select Save. Restart your server.

Vizualisation

Mode MEMORY

Mode Remote

  • See H2H-Web project

Add custom entry point

For add new entry point because we can't support your prefer framework you must create 2 services (class) : first retrieve the entrypoint and the second treat the list of entrypoint.

The first service must extends com.highway2urhell.transforme.AbstractLeechTransformer. You must implements doTransform with 2 requirements :

  • Create the list of entrypoint ArrayList
  • Send the data to CoreEngine with CoreEngine.getInstance().getFramework(your_framework).receiveData(listEntryPath) You must implements the constructor like :
super(package_class_modified_by_agent);// example "com/google/gwt/user/server/rpc/RemoteServiceServlet" 
addImportPackage(String... packages);// list package add by Agent for running the agent with your modification. example "java.lang.reflect", "java.util","org.reflections", "org.reflections.util", "java.util.Map"

For example, we recommand to see the actual transformer in package com.highway2urhell.transformer.

The second service must extends com.highway2urhell.service.AbstractLeechService with 1 requirement :

  • The constructor must invoke like
super(FRAMEWORK_NAME, VersionUtils.getVersion("package_class","groupid", "artifactId"));

Add custom vizualisation

For add your custom vizualisation you must :

  • implements the interface com.highway2urhell.generator.TheJack
  • add your class in highway-to-url distribution

Supports

JetBrains

  • Thanks to JetBrains for providing licenses to build this project.
com.highway2urhell

Versions

Version
1.0.5
1.0.4
1.0.3
1.0.1