mirror of
https://github.com/danielmiessler/SecLists.git
synced 2026-08-12 04:31:04 +00:00
patched away faulty checks and replacements
This commit is contained in:
@@ -51,11 +51,11 @@ DETAIL_USER_NOTICE_STRING=DETAIL_USER_NOTICE_STRING%(DETAILS_ANCHOR,final_size,e
|
|||||||
|
|
||||||
readme_contents=open("README.md").read()
|
readme_contents=open("README.md").read()
|
||||||
|
|
||||||
if re.match(DETAILS_ANCHOR_REGEX,readme_contents,flags=re.DOTALL):
|
if not re.search(DETAILS_ANCHOR_REGEX,readme_contents,flags=re.DOTALL):
|
||||||
print("[!] Error: No details anchor found!")
|
print_err("README.md", "[!] Error: No details anchor found!")
|
||||||
exit(2)
|
exit(2)
|
||||||
|
|
||||||
readme_contents=re.sub(DETAILS_ANCHOR_REGEX,DETAIL_USER_NOTICE_STRING,readme_contents,flags=re.DOTALL)
|
readme_contents=re.sub(DETAILS_ANCHOR_REGEX,DETAIL_USER_NOTICE_STRING,readme_contents,count=1,flags=re.DOTALL)
|
||||||
open("README.md","w").write(readme_contents)
|
open("README.md","w").write(readme_contents)
|
||||||
|
|
||||||
print("[+] Wrote README.md!")
|
print("[+] Wrote README.md!")
|
||||||
|
|||||||
Reference in New Issue
Block a user