MCPcopy Create free account
hub / github.com/R4be1/PuppetMaster / getTextBetweenStrings

Function getTextBetweenStrings

Master.py:351–356  ·  view source on GitHub ↗
(text, start_string, end_string)

Source from the content-addressed store, hash-verified

349 return ''.join(random.sample('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', 16))
350
351def getTextBetweenStrings(text, start_string, end_string):
352 if (start_string not in text) or (end_string not in text):
353 return "<unknown>"
354 start_index = text.rfind(start_string) + len(start_string)
355 end_index = text.rfind(end_string, start_index)
356 return text[start_index:end_index]
357import urllib.request
358import json
359

Callers 1

handle_shell_initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected