Python编译的.exe被归类为病毒

时间:2018-06-20 13:19:52

标签: python

Python 3.65,Windows 7。

我的防病毒软件(Avira)说我的编译代码是病毒,并一直删除它。 我已将程序列入白名单,但令我担心的是,VirusTotal上其他11位60岁以上的病毒检查人员也认为它是病毒。

我相信这是一个错误的肯定,但是当我写点值得分发的东西怎么办?

这正常吗?还是我的源代码中有些东西在编译时看起来像启发式的“病毒”?

import pyperclip
from tkinter import *
from ctypes import windll
import os
import time
# default folder for saves "c:\\cb-pastes"
#default txt file "c:\\cb-pastes\\saved.txt"
#================set up gui=======================
root = Tk()

#check if "c:\\cb-pastes" exists, if not, create folder
check_folder=os.path.isdir("c:\\cb-pastes")
if not check_folder:
    os.makedirs("c:\\cb-pastes")

#button functions
def call_save():
    ct=time.asctime()          #get system time and date in ct
    cb_txt = pyperclip.paste() #store clipboard in cb_txt

    f = open("c:\\cb-pastes\\saved.txt","a") # open the file:
    f.write ("\n")                           #newline
    f.write (ct)                             #save date and time with the text
    f.write ("\n")
    f.write (cb_txt)                         #append to text file      
    f.write ("\n")
    f.write ("-----------------------------")  
    f.close()                               #Close the file

def call_clear(): #clear clipboard
    if windll.user32.OpenClipboard(None):
        windll.user32.EmptyClipboard()
        windll.user32.CloseClipboard()


def call_view(): #open text file of saved clips
    os.startfile('c:\\cb-pastes\\saved.txt')

def call_viewcb(): #open text file of current clipboard contents
    cb_get = pyperclip.paste()
    f = open("c:\\cb-pastes\\temp.txt","w")
    f.write (cb_get)
    f.close()
    os.startfile('c:\\cb-pastes\\temp.txt')


#create window
root.title ("CBMan V0.8")
root.geometry ("230x132")

# create buttons
app = Frame(root)
app.grid()

button1 = Button(app, text = "Save Clipboard",width=13, command=call_save)
button1.grid(row=0,column=0)
button2 = Button(app, text = "Clear Clipboard",width=13, command=call_clear)
button2.grid()
button3 = Button(app, text = "View Saves     ",width=13, command=call_view)
button3.grid()
button4 = Button(app, text = "View Clipboard ",width=13, command=call_viewcb)
button4.grid()

#insert logo
photo = PhotoImage(file="c:\\cb-pastes\\cbman.gif")
label = Label(image=photo)
label.image = photo # keep a reference!
label.grid(row=0,column=1)

mainloop()

有什么建议吗?史蒂夫(是)乱七八糟。

0 个答案:

没有答案