Sure you want to initialize path to be "" , empty string :?

Looks like you're trying to find available files on the share with the find_first call above. Shouldn't the module use one of the files to trigger the vulnerability:? Just asking (proceeded with some testing and using and empty path doesn't work for me).