Giter Club home page Giter Club logo

Comments (3)

Mzack9999 avatar Mzack9999 commented on June 26, 2024

This is being worked on at #946 - Unfortunately there is some internal lock within gopacket that prevents a complete release of interface handlers. Additionally a few active handlers literally kill kernel performances in populating their ring buffers, making them unresponsive. So the internals are being reworked to create only one handler per interface and using a pool of workers with demultiplexed traffic. Until the PR is ready you can switch to connect scan where the kernel manages all connections independently via syscall:

...
ScanType:          "c",
...

from naabu.

wealeson1 avatar wealeson1 commented on June 26, 2024

Thanks for your answer. Thanks for your work.

from naabu.

JoshuaMart avatar JoshuaMart commented on June 26, 2024

Hi,
I am taking advantage of this issue which may explain my problem.

Additionally a few active handlers literally kill kernel performances in populating their ring buffers, making them unresponsive

Is it global to the use of the library? @Mzack9999
Here's my Go code :

package main

import (
	"log"

	"github.com/projectdiscovery/goflags"
	"github.com/projectdiscovery/naabu/v2/pkg/result"
	"github.com/projectdiscovery/naabu/v2/pkg/runner"
)

func main() {
	options := runner.Options{
		Host:      goflags.StringSlice{"domain.tld"},
		ScanType: "s",
		OnResult: func(hr *result.HostResult) {
			log.Println(hr.Host, hr.Ports)
		},
		TopPorts: "100",
		Threads: 25,
	}

	naabuRunner, _ := runner.NewRunner(&options)
	defer naabuRunner.Close()

	naabuRunner.RunEnumeration()
}

Performance is terrible compared to using the CLI :/

jomar@SRV:~$ time naabu -host domain.tld -tp 100 -silent
domain.tld:80
domain.tld:22
domain.tld:443

real    0m17.698s

jomar@SRV:~$ ./main
[INF] Running CONNECT scan with non root privileges
[INF] Found 3 ports on host domain.tld (x.x.x.x)
domain.tld:80
domain.tld:22
domain.tld:443

real    1m12.432s

Regards

from naabu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.