Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to update nmap-probe-services file ? #18

Open
neginsadeghi opened this issue Jan 24, 2024 · 8 comments
Open

How to update nmap-probe-services file ? #18

neginsadeghi opened this issue Jan 24, 2024 · 8 comments

Comments

@neginsadeghi
Copy link

neginsadeghi commented Jan 24, 2024

How can I update this file based on latest version ?

https://raw.githubusercontent.com/nmap/nmap/master/nmap-service-probes

如何根据最新版本更新此文件?

https://raw.githubusercontent.com/nmap/nmap/master/nmap-service-probes

@lcvvvv
Copy link
Owner

lcvvvv commented Jan 24, 2024

修改nmap-service-probes.go文件

@neginsadeghi
Copy link
Author

I did it but after running I got weird errors, I even did this :

sed -i "s/`/${backquote}/g" nmap-service-probes.go

but I got :

panic: port expression string invalid

goroutine 1 [running]:
gonmap.parsePortList({0xc000e7e5c0, 0x13})
/usr/local/go/src/gonmap/type-portlist.go:19 +0x3b0
gonmap.(*Nmap).loadExclude(...)
/usr/local/go/src/gonmap/type-nmap.go:277
gonmap.(*Nmap).loads(0xc000098820, {0xc000e7e000?, 0x264933?})
/usr/local/go/src/gonmap/type-nmap.go:257 +0x18a
gonmap.initWithFilter(0x9)
/usr/local/go/src/gonmap/gonmap.go:51 +0x408
gonmap.init.0()
/usr/local/go/src/gonmap/gonmap.go:27 +0x18

please tell me what else should I do except that sed command

@neginsadeghi
Copy link
Author

我做到了,但运行后出现了奇怪的错误,我什至这样做了:

sed -i "s/`/${反引号}/g" nmap-service-probes.go

但我得到了:

恐慌:端口表达式字符串无效

Goroutine 1 [运行]:
gonmap.parsePortList({0xc000e7e5c0, 0x13})
/usr/local/go/src/gonmap/type-portlist.go:19 +0x3b0
gonmap.(*Nmap).loadExclude(...)
/usr/local/go/src/gonmap/type-nmap.go:277
gonmap.(*Nmap).loads(0xc000098820, {0xc000e7e000?, 0x264933?})
/usr/local/go/src/gonmap/type-nmap.go:257 +0x18a
gonmap.initWithFilter(0x9)
/usr/local/go/src/gonmap/gonmap.go:51 +0x408
gonmap.init.0()
/usr/local/go/src/gonmap/gonmap.go:27 +0x18

请告诉我除了 sed 命令之外我还应该做什么

@lcvvvv
Copy link
Owner

lcvvvv commented Jan 31, 2024

似乎是新的nmap-service-probes解析的一些问题,具体逻辑你可以看一下
/usr/local/go/src/gonmap/type-portlist.go:19

@neginsadeghi
Copy link
Author

我没有更改类型端口文件上的任何内容!
我刚刚更新了指纹文件,就发生了这种情况,你能自己重现一下吗?

@lcvvvv
Copy link
Owner

lcvvvv commented Jan 31, 2024

说明你更新的nmap-service-probes文件,无法被正常解析,这需要你自己排查一下原因

@neginsadeghi
Copy link
Author

这就是问题,这是我的主要问题,您首先是如何创建 nmap-service-probes.go 文件的?

请告诉我步骤,我将根据您在 nmap-service-probes.go 上所做的修改来修改主 nmap 探针文件

@linger118927
Copy link

https://github.com/breaking153/go-nmap
@neginsadeghi perhaps this branch project can help you,support the latest probes file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants