Can you tell me which exact JVM you are using? Are you using Windows or Linux?It seems there is no: java.lang.ClassNotFoundException: com.sun.tools.attach.spi.AttachProviderAre you sure you have the JDK installed (execute: java -version) and the JAVA_HOME is setup correctly? Also make sure you have a tools.jar that can be found: https://github.com/invesdwin/invesdwin-instrument/blob/master/invesdwin-instrument/src/main/java/de/invesdwin/instrument/internal/JdkFilesFinder.javaIf the automatic loading of the agent does not work, you have to set the " -javaagent:invesdwin-instrument.jar" JVM parameter. replace investing-instrument.jar with the actual jar file location.More information: https://github.com/invesdwin/invesdwin-instrumentOn Tue, Feb 2, 2021 at 12:37 PM Prasad Katre <prasad...@gmail.com> wrote:Hi Edwin,I am getting below error while running the standalone jar with open jdk 1.8[root@localhost target]# java -jar invesdwin-webproxy-portscan-dist-1.0.2-SNAPSHOT-standalone.jar
2021-02-02 17:03:16.846 [ |main ] INFO d.i.c.b.i.p.u.i.LogbackConfigurationLoader.logLogbackBeingCo - Loading 3 logback configs from classpath [/META-INF/logback/integration.logback.xml, /META-INF/logback/context.logback.xml, /META-INF/logback/integration.jms.logback.xml]
2021-02-02 17:03:16.925 [ |main ] INFO d.i.c.b.i.p.u.internal.SystemPropertiesLoader.logPropertiesB - Loading 5 properties files from classpath [/META-INF/de.invesdwin.context.integration.properties, /META-INF/de.invesdwin.context.properties, /META-INF/io.netty.versions.properties, /META-INF/spring.integration.default.properties, /META-INF/de.invesdwin.webproxy.portscan.properties]
2021-02-02 17:03:16.945 [ |main ] INFO d.i.c.b.i.p.u.internal.SystemPropertiesLoader.logOverridePro - Loading 0 override properties files from [file:/root/.invesdwin/system.properties(0), classpath*:/META-INF/env/distribution.properties(0)]
2021-02-02 17:03:17.453 [ |main ] INFO d.i.c.b.i.p.u.internal.BasePackagesConfigurer.getBasePackage - Loading 1 base package [de.invesdwin]
Exception in thread "Thread-4" java.lang.RuntimeException: java.lang.RuntimeException: To run on OpenJDK 64-Bit Server VM use -javaagent:invesdwin-instrument.jar
at de.invesdwin.instrument.DynamicInstrumentationLoader$1.run(DynamicInstrumentationLoader.java:90)
Caused by: java.lang.RuntimeException: To run on OpenJDK 64-Bit Server VM use -javaagent:invesdwin-instrument.jar
at de.invesdwin.instrument.internal.DynamicInstrumentationLoadAgentMain.loadAgent(DynamicInstrumentationLoadAgentMain.java:62)
at de.invesdwin.instrument.DynamicInstrumentationLoader.loadAgent(DynamicInstrumentationLoader.java:119)
at de.invesdwin.instrument.DynamicInstrumentationLoader.access$000(DynamicInstrumentationLoader.java:29)
at de.invesdwin.instrument.DynamicInstrumentationLoader$1.run(DynamicInstrumentationLoader.java:87)
Caused by: java.lang.ClassNotFoundException: com.sun.tools.attach.spi.AttachProvider
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at de.invesdwin.instrument.internal.DynamicInstrumentationLoadAgentMain.loadAgent(DynamicInstrumentationLoadAgentMain.java:31)
... 3 moreregards,Prasad.On Tue, Feb 2, 2021 at 12:11 AM sub es <gsu...@gmail.com> wrote:1. My projects should be downwards compatible to jdk8. If not, raise a bug, I occasionally test against jdk8.2. synchronous is a very bad idea here from an architecture perspective.3. this is only relevant for spring-integration. These objects facilitate the command message pattern. No explicit usage required.4. just run the standalone jars via java -jar xyz-standalone.jar. If you also deploy webproxy-broker on the same machine, they will communicate via jms. Though you have to setup a mysql database following the docs from invesdwin-context-persistence or configure a h2 inmemory storage. The webproxy-broker will crawl for proxies and validate those using webproxy-portscan. The xyz-dist project create the standalone jars as distributions of the individual modules.Though I think I had some unit tests in those projects. If you run eclipse as admin you should be able to run tests against jpcapng directly. This should allow for easier debugging.5. there should be some log outputs that tell about which network interface was selected. I think it was in some static initializer for jpcapng using native apis.
Von: prasad...@gmail.comGesendet: 1. Februar 2021 19:32An: gsu...@gmail.comBetreff: Re: invesdwin-webproxy-portscan
Hi Edwin,Thanks for your email. This will certainly help me to proceed with the portscan implementation. but there are few differences/limitations on my requirements. JDK on my side is 1.8 not jDK 9 :( . I could the code is jdk 9 based.1. There could be chance that Ping is blocked on n/w , so I do not need to check if host is available using ping. So in case the host is not reachable by syn packet will timeout or some exception will come. I will treat it as port closed.2. I need to make this as Synchronous call as host ip for port scanning is actually coming on kafka message. So I want to make this Portscan call synchronous.3. I could see PortScanSyncRequest in XSD payload but no api uses it. I think it is not being used. I think this PortScanAsyncRequest is only used.4. Also can you help me how can I test your code as standalone Java program so that I can debug and see how things are getting invoked.5. Also how the network interface is detected or loaded ?Regards,Prasad.
On Mon, Feb 1, 2021 at 10:23 PM subes <gsu...@gmail.com> wrote:
(validate host before scanning)(find open ports)You could reuse invesdwin-webproxy-portscan (currently there are messaging gateways for this via rabbitmq/AMQP and activemq/JMS):Here you send requests for ping/syn scans:Here you receive response messages for hosts/ports found:Everything is asynchronous and the service implementation handles throttling (configurable) so that the network does not get overloaded and prevents the target from blocking your IP (against intrusion detection).Best regards,EdwinPrasad Katre schrieb am Montag, 1. Februar 2021 um 17:47:30 UTC+1:Hi,I am trying to build TCP SYN based portscanner as simple microservice which will scan the ports(list of ports) for specific Ip address.Can you please point to the code which you have used to do so using Jpcapng?Looking for some pointer which will help me to proceed on this line.Thanks in advance.Regards,Prasad.
--
You received this message because you are subscribed to a topic in the Google Groups "invesdwin-platform" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/invesdwin-platform/k258KMS6BQU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to invesdwin-platf...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/invesdwin-platform/4334748b-ada5-4c5f-a678-0a80b403d145n%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "invesdwin-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to invesdwin-platf...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/invesdwin-platform/bb56667e-ab1c-4a32-9fcd-dba46fec88d1n%40googlegroups.com.
Hi Edwin,I am using Centos 7 on my virtual box.cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"I have already installed libpcap.Package 14:libpcap-devel-1.5.3-12.el7.x86_64 already installed and latest version
Package 14:libpcap-1.5.3-12.el7.x86_64 already installed and latest versionDo you have any project/library which is used for TCP syn based port scanner? My main goal is to write the TCY SYN based port scanner in java.Regards,Prasad.