Skip to content

Commit 41246d6

Browse files
committed
Add case-insensitive matching for function names in load_ps
1 parent 122c7ff commit 41246d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

evil_winrm_py/evil_winrm_py.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ def load_ps(r_pool: RunspacePool, local_path: str):
964964
content = re.sub(r"<#.*?#>", "", script, flags=re.DOTALL)
965965
# Find all function names in the script
966966
pattern = r"function\s+([a-zA-Z0-9_-]+)\s*(?={|$)"
967-
function_names = re.findall(pattern, content, re.MULTILINE)
967+
function_names = re.findall(pattern, content, re.MULTILINE | re.IGNORECASE)
968968

969969
ps.add_script(f". {{ {script} }}") # Dot sourcing the script
970970
ps.begin_invoke()

0 commit comments

Comments
 (0)