MCPcopy Create free account
hub / github.com/sqlmapproject/sqlmap / search

Method search

thirdparty/bottle/bottle.py:4223–4240  ·  view source on GitHub ↗

Search name in all directories specified in lookup. First without, then with common extensions. Return first hit.

(cls, name, lookup=None)

Source from the content-addressed store, hash-verified

4221
4222 @classmethod
4223 def search(cls, name, lookup=None):
4224 """ Search name in all directories specified in lookup.
4225 First without, then with common extensions. Return first hit. """
4226 if not lookup:
4227 raise depr(0, 12, "Empty template lookup path.", "Configure a template lookup path.")
4228
4229 if os.path.isabs(name):
4230 raise depr(0, 12, "Use of absolute path for template name.",
4231 "Refer to templates with names or paths relative to the lookup path.")
4232
4233 for spath in lookup:
4234 spath = os.path.abspath(spath) + os.sep
4235 fname = os.path.abspath(os.path.join(spath, name))
4236 if not fname.startswith(spath): continue
4237 if os.path.isfile(fname): return fname
4238 for ext in cls.extensions:
4239 if os.path.isfile('%s.%s' % (fname, ext)):
4240 return '%s.%s' % (fname, ext)
4241
4242 @classmethod
4243 def global_config(cls, key, *args):

Callers 15

__init__Method · 0.95
colorizeMethod · 0.45
_eat_headersMethod · 0.45
loaderMethod · 0.45
translateMethod · 0.45
read_codeMethod · 0.45
feedMethod · 0.45
retrieveFunction · 0.45
check_payloadFunction · 0.45
non_blind_checkFunction · 0.45
runFunction · 0.45
tamperFunction · 0.45

Calls 1

deprFunction · 0.85

Tested by 1

tamperFunction · 0.36