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

Crash with error “Panic on scanner modbus when scanning target” #475

Open
kuixiang opened this issue Nov 11, 2024 · 0 comments
Open

Comments

@kuixiang
Copy link

root>>    echo "157.101.162.250" | ./zgrab2 modbus
INFO[0000] started grab at 2024-11-11T10:06:24+08:00
ERRO[0000] Panic on scanner modbus when scanning target 157.101.162.250: runtime.boundsError{x:1, y:0, signed:true, code:0x3}
panic: runtime error: slice bounds out of range [1:0] [recovered]
	panic: runtime error: slice bounds out of range [1:0]

goroutine 24 [running]:
github.com/zmap/zgrab2.grabTarget.func1({0xc0003ad6c0?, 0xc000038500?})
	/opt/zgrab2-0.1.7/processing.go:165 +0x154
panic({0xa2b900, 0xc0000dc0d8})
	/usr/local/go/src/runtime/panic.go:890 +0x262
github.com/zmap/zgrab2/modules/modbus.(*Conn).GetModbusResponse(0xc0000abaa8)
	/opt/zgrab2-0.1.7/modules/modbus/modbus.go:372 +0x4a5
github.com/zmap/zgrab2/modules/modbus.(*Scanner).Scan(0xc0000b03e0, {{0xc00035ced0, 0x10, 0x10}, {0x0, 0x0}, {0x0, 0x0}, 0x0})
	/opt/zgrab2-0.1.7/modules/modbus/scanner.go:172 +0x48c
github.com/zmap/zgrab2.RunScanner({0xb925f0, 0xc0000b03e0}, 0xc0000a0ae0, {{0xc00035ced0, 0x10, 0x10}, {0x0, 0x0}, {0x0, 0x0}, ...})
	/opt/zgrab2-0.1.7/scanner.go:32 +0xf1
github.com/zmap/zgrab2.grabTarget({{0xc00035ced0, 0x10, 0x10}, {0x0, 0x0}, {0x0, 0x0}, 0x0}, 0x0?)
	/opt/zgrab2-0.1.7/processing.go:168 +0x43b
github.com/zmap/zgrab2.Process.func2(0x0?)
	/opt/zgrab2-0.1.7/processing.go:215 +0x199
created by github.com/zmap/zgrab2.Process
	/opt/zgrab2-0.1.7/processing.go:208 +0x10b
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

1 participant