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

fix bad argument exception when using smb-ls script #588

wants to merge 1 commit into from


Copy link

After updating to nmap7.25BETA2 from nmap7.25BETA1 I started consistently encountering a bad date argument exception when trying to run the smb-ls script on a target

On line 1068 an additional / was added to the expression in commit "Merge branch 'nse-lua53'"

Adding a / to the expression on line 2808 to match line 1068 fixes the issue.

Alternatively, removing the newly added / to the expression on line 1068 should also fix it.

I do not know which solution is preferred/correct.

Copy link

sstelfox commented Nov 9, 2016

The difference is a single slash ('/') will do full division return a floating point number. A double slash ('//') will drop the decimal returning a whole integer.

Based on how it is being used I'm guessing the double slash, dropping the decimals values, is correct.

Copy link

@sstelfox thank you for the clarification :)

Copy link

awk9000 commented Nov 11, 2016

Also tested this with latest stable update, smb-ls fails, downloaded Dallas's modified smb.lua and replaced, retested, everything works!

Copy link


Copy link

As stated by @sstelfox already Link tells that // will perform floor division, which is needed in this case since only expects integer value as second parameter.

Copy link

cldrn commented Nov 21, 2016

I will look into this today, your solution seems correct. Thanks for all the details.

Copy link

@cldrn bump, did you get a chance to look at this?

@nmap-bot nmap-bot closed this in 70e9d70 Nov 30, 2016
suraj51k pushed a commit to suraj51k/nmap that referenced this pull request Jan 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

7 participants