Code Monkey home page Code Monkey logo

Comments (2)

chux0r avatar chux0r commented on May 28, 2024

debug- parsePortsCDL() is the culprit. debug data showing the parsed string getting by once it becomes a (bad) number:

netbang -p 80,8urr1to-,111,10000,80000 --debug scanme.org
DEBUG: flags set: [ 2 ]
DEBUG: Flag [debug]: SET
	VALUE -> [true]
DEBUG: Flag [p]: SET
	VALUE -> [80,8urr1to-,111,10000,80000]
DEBUG: constructor() complete. 
	TARGET NETWORK DETAIL: [ {tcp [20 21 22 23 25 43 53 67 68 69 79 80 88 110 111 113 119 135 137 139 143 177 179 389 443 445 464 512 513 514 515 546 547 587 593 636 853 873 989 990 993 995 1270 1337 1433 1434 1521 2222 2323 2375 2483 2484 3306 3333 3389 5060 5061 5432 5800 5900 8008 8080 8081 8088 8443] []} ]
	TARGET: [ 127.0.0.1 ]
DEBUG: CUSTOM PORTDEF->PortList: RESET
	TARGET NETWORK DETAIL: [ {tcp [] []} ]
	TARGET: [ 127.0.0.1 ]
DEBUG: buildPortsList(): Process input [ 80,8urr1to-,111,10000,80000 ] with parsePortsCdl()
DEBUG: parsePortsCDL(): parsing [ 80,8urr1to-,111,10000,80000 ]
DEBUG: parsePortsCDL(): Evaluating item [ 80 ]
DEBUG: parsePortsCDL(): Item [ 80 ] is a number [ 80 ]. Appended. Current port slice [ [80] ]
DEBUG: parsePortsCDL(): Evaluating item [ 8urr1to- ]
DEBUG: parsePortsCDL(): [ 8urr1to- ] result: NAN
DEBUG: parsePortsCDL(): [ 8urr1to- ] is possibly a port range.
DEBUG: ArgsToPortRange. Result: RANGE[ 0 ]:[ 0 ]
DEBUG: parsePortsCDL(): Evaluating item [ 111 ]
DEBUG: parsePortsCDL(): Item [ 111 ] is a number [ 111 ]. Appended. Current port slice [ [80 111] ]
DEBUG: parsePortsCDL(): Evaluating item [ 10000 ]
DEBUG: parsePortsCDL(): Item [ 10000 ] is a number [ 10000 ]. Appended. Current port slice [ [80 111 10000] ]
DEBUG: parsePortsCDL(): Evaluating item [ 80000 ]
DEBUG: parsePortsCDL(): Item [ 80000 ] is a number [ 80000 ]. Appended. Current port slice [ [80 111 10000 14464] ]

DEBUG: parsePortsCdl() Port range def string:  80,8urr1to-,111,10000,80000

from netbang.

chux0r avatar chux0r commented on May 28, 2024

parsePortsCDL() checks "ports" int32 value after it comes back from uglynum to trap bad values (>=65536 or <= 0) now.

mongoose@thoughtcrime:~/workbench/dev/golang/netbang$ ./netbang -p 80,8urr1to-,111,10000,80000 --debug scanme.org
DEBUG: flags set: [ 2 ]
DEBUG: Flag [debug]: SET
	VALUE -> [true]
DEBUG: Flag [p]: SET
	VALUE -> [80,8urr1to-,111,10000,80000]
DEBUG: constructor() complete. 
	TARGET NETWORK DETAIL: [ {tcp [20 21 22 23 25 43 53 67 68 69 79 80 88 110 111 113 119 135 137 139 143 177 179 389 443 445 464 512 513 514 515 546 547 587 593 636 853 873 989 990 993 995 1270 1337 1433 1434 1521 2222 2323 2375 2483 2484 3306 3333 3389 5060 5061 5432 5800 5900 8008 8080 8081 8088 8443] []} ]
	TARGET: [ 127.0.0.1 ]
DEBUG: CUSTOM PORTDEF->PortList: RESET
	TARGET NETWORK DETAIL: [ {tcp [] []} ]
	TARGET: [ 127.0.0.1 ]
DEBUG: buildPortsList(): Process input [ 80,8urr1to-,111,10000,80000 ] with parsePortsCdl()
DEBUG: parsePortsCDL(): parsing [ 80,8urr1to-,111,10000,80000 ]
DEBUG: parsePortsCDL(): Evaluating item [ 80 ]
DEBUG: parsePortsCDL(): Item [ 80 ] is a number [ 80 ]. Appended. Current port slice [ [80] ]
DEBUG: parsePortsCDL(): Evaluating item [ 8urr1to- ]
DEBUG: parsePortsCDL(): [ 8urr1to- ] result: NAN
DEBUG: parsePortsCDL(): [ 8urr1to- ] is possibly a port range.
DEBUG: ArgsToPortRange. Result: RANGE[ 0 ]:[ 0 ]
DEBUG: parsePortsCDL(): Evaluating item [ 111 ]
DEBUG: parsePortsCDL(): Item [ 111 ] is a number [ 111 ]. Appended. Current port slice [ [80 111] ]
DEBUG: parsePortsCDL(): Evaluating item [ 10000 ]
DEBUG: parsePortsCDL(): Item [ 10000 ] is a number [ 10000 ]. Appended. Current port slice [ [80 111 10000] ]
DEBUG: parsePortsCDL(): Evaluating item [ 80000 ]
2024/03/29 17:22:49 Error! Port number [ 80000 ] is not valid. Must be between 1 and 65535. Exiting

from netbang.

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.