Jun-15-2021, 03:19 PM
I am currently trying to make simple code that misspells a word and copies it to your clipboard but when I share it to another computer it is detected by antivirus as a trojan. Is there anything I can do to prevent this from happening?
Here is my code:
Here is my code:
import random
import pyperclip
filler = []
valid = False
def charGen(x):
if x == 6:
return "b"
elif x == 5:
return "a"
elif x == 4:
return "n"
elif x == 3:
return "a"
elif x == 2:
return "n"
elif x == 1:
return "a"
while not valid:
word = "b"
filler = []
length = random.randint(3, 7)
word = word + charGen((random.choice([4, 5])))
for a in range(length):
filler.append(charGen(random.randint(1, 6)))
word += filler[a]
word = word + "a"
if word.find('n') >= 0:
print(word)
valid = True
for b in range(len(word)-1):
if word[b] == word [b+1]:
valid = False
pyperclip.copy(word)(tbh, the reason the charGen function has so many repeating words is because it was originally intended for another word)
