1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-20 13:19:01 +00:00

don't require a ".nse" extension when specifying script names with --script

This commit is contained in:
kris
2007-11-29 23:11:48 +00:00
parent 5e50f5084a
commit d05555e8a2

View File

@@ -227,6 +227,12 @@ int init_rules(lua_State* l, std::vector<std::string> chosenScripts) {
c_iter = strdup((*iter).c_str());
type = init_fetchfile(path, sizeof(path), c_iter);
free(c_iter);
if (type == 0) {
c_iter = strdup((*iter + std::string(SCRIPT_ENGINE_EXTENSION)).c_str());
type = init_fetchfile(path, sizeof(path), c_iter);
free(c_iter);
}
switch(type) {
case 0: // no such path