MCPcopy
hub / github.com/epinna/tplmap / md5

Method md5

core/plugin.py:537–557  ·  view source on GitHub ↗
(self, remote_path)

Source from the content-addressed store, hash-verified

535
536 """ Overridable function to get MD5 hash of remote files. """
537 def md5(self, remote_path):
538
539 action = self.actions.get('md5', {})
540 payload = action.get('md5')
541 call_name = action.get('call', 'render')
542
543 # Skip if something is missing or call function is not set
544 if not action or not payload or not call_name or not hasattr(self, call_name):
545 return
546
547 execution_code = payload % ({ 'path' : remote_path })
548
549 result = getattr(self, call_name)(
550 code = execution_code,
551 )
552
553 # Check md5 result format
554 if re.match(r"([a-fA-F\d]{32})", result):
555 return result
556 else:
557 return None
558
559 """ Overridable function to detect read capabilities. """
560 def detect_read(self):

Callers 5

readMethod · 0.95
writeMethod · 0.95
md5Function · 0.80
test_uploadMethod · 0.80
test_upload_blindMethod · 0.80

Calls 1

getMethod · 0.80

Tested by 2

test_uploadMethod · 0.64
test_upload_blindMethod · 0.64