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

Already on GitHub? Sign in to your account

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

wants to merge 1 commit into


None yet
7 participants

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.

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.

@sstelfox thank you for the clarification :)

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!



tremblerz commented Nov 12, 2016

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


cldrn commented Nov 21, 2016

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

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

@nmap-bot nmap-bot closed this in 70e9d70 Nov 30, 2016

suraj51k added 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