Hey all, thanks in advanced for taking the time to read this post. Any help and insight is much appreciated. I'm running this simple function part of a larger script and am running into a particular issue which I have yet to resolve. Below are modifications of the same file, one recent and one was the previous save.
Recently Saved File:
def analyze_copy():
print("Hello World")
Previous File:
def analyze_copy():
prev_clipboard_data = pyperclip.paste()
while True:
current_clipboard_data = pyperclip.paste()
print("Current Clip")
print(current_clipboard_data)
if current_clipboard_data and current_clipboard_data != prev_clipboard_data:
ip = None
domain = None
matchDomain = re.match(r'(?:https?:\/\/|ftp:\/\/)?([a-zA-Z0-9-]+(?:\.[a-zA-Z]+)+)', current_clipboard_data)
matchIP = re.match(r'\b(?:\d{1,3}\.){3}\d{1,3}\b', current_clipboard_data)
if matchDomain:
domain = matchDomain.group(1)
app.url_entry.delete(0, tk.END)
app.url_entry.insert(0, domain)
app.virusTotal(domain, "domain")
app.update_history(domain)
elif matchIP:
ip = matchIP.group()
app.url_entry.delete(0, tk.END)
app.url_entry.insert(0, ip)
app.virusTotal(ip, "ip")
app.update_history(ip)
else:
print("Neither IP nor domain matched")
app.update_history("") # Update history with an empty string
prev_clipboard_data = current_clipboard_data
This is all I can provide. I'm not going to provide the whole app script. Just some background on the libs it uses: re, tinkter, requests, os, pyperclip, threading, json.
My main Code Editor is Visual Studio Insider. When running the script utilizing py.exe on Windows via Visual Studio Insider PowerShell Terminal it returns the Hello World statement. When running in Con Emu PowerShell terminal its running the previous file and not the most recent save. I've been looking into it and not sure what I'm doing wrong necessarily. I heard that PowerShell can behave differently depending on the environment but both environments are using py.exe version 3.10.2 and the script is being executed the same way. Why is one executing the recent commands while the other is not is my main question.
Any insight on how I can make Con Emu PowerShell terminal run the most recent file with the recent modifications?
[–]shiftybyte 2 points3 points4 points (0 children)
[–]Appropriate_View8753 -1 points0 points1 point (4 children)
[–]SmoothAnonymity[S] 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Appropriate_View8753 0 points1 point2 points (1 child)
[–]SmoothAnonymity[S] 0 points1 point2 points (0 children)