Jump to content

detected as virus


Recommended Posts

I wrote a really simple tool (noobie XD)and AntiVir marks it as a trojan.

Can u tell me why ? (maybe it's the shutdown function)

Any other suggestions welcome.

;time saver v 2.0 by zentral
Dim $delay =200 , $set=0

TrayTip("Time saver","Ready !"&@CRLF&"Please choose a time option." , 10, 1)
Opt("TrayOnEventMode",1)
Opt("TrayMenuMode",1)
$1item = TrayCreateItem("15 min")
TrayItemSetOnEvent(-1,"_15")
$1item = TrayCreateItem("30 min")
TrayItemSetOnEvent(-1,"_30")
$2item = TrayCreateItem("60 min")
TrayItemSetOnEvent(-1,"_60")
$setitem = TrayCreateItem("Custom")
TrayItemSetOnEvent(-1,"_custom")
TrayCreateItem("")
$aboutitem = TrayCreateItem("About")
TrayItemSetOnEvent(-1,"_about")
TrayCreateItem("")
$exititem = TrayCreateItem("Exit")
TrayItemSetOnEvent(-1,"ExitScript")
TraySetState(4)

while 1 
    if $set= 1 then 
        Sleep($delay)
        _stop()
    EndIf
WEnd

Func _15()
    $delay = 900000
    TrayTip("Time saver", "15 minutes."&@CRLF&"Started at"&@HOUR&":"&@MIN&":"&@SEC, 10, 1)
    TraySetState(8)
    $set=1
EndFunc

Func _30()
    $delay = 1800000
    TrayTip("Time saver", "30 minutes."&@CRLF&"Started at"&@HOUR&":"&@MIN&":"&@SEC, 10, 1)
    TraySetState(8)
    $set=1
EndFunc

Func _60()
    $delay = 3600000
    TrayTip("Time saver", "60 minutes."&@CRLF&"Started at"&@HOUR&":"&@MIN&":"&@SEC, 10, 1)
    TraySetState(8)
    $set=1
EndFunc

Func _custom()
    Do
    $time= InputBox("Time saver","How much time ? (minutes)")
    Until $time>0
    $delay = $time*60000
    TrayTip("Time saver",$time&" minutes"&@CRLF&"Started at"&@HOUR&":"&@MIN&":"&@SEC, 10, 1)
    TraySetState(8)
    $set=1
EndFunc

func _stop()
    Beep(500,500)
$m=msgbox(276,"Time saver _ WARNING!","Time expired ... system shutdown"&@CRLF&"Are you doing something important?",300000)
if $m=7 or $m=-1 then
    msgbox(64,"Time saver","5 seconds to shutdown...",5)
    shutdown(0) 
    Exit
else
    msgbox(64,"Time saver","You got 15 more min.")
    sleep(900000)
    Beep(500,500)
    msgbox(16,"Time saver _ WARNING!","Time expired ... system shutdown",5)
    shutdown(0) 
    Exit
EndIf
EndFunc

Func _about()
    TrayTip("Time saver", "by "&@CRLF&"Please visit AutoIt website.", 10, 1)
EndFunc

Func exitscript()
    Exit
EndFunc
Link to comment
Share on other sites

  • Moderators

zentral,

Please read the Sticky topic "Are my Autoit EXES really infected?" about 2 cms above yours! :mellow:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

zentral,

Please read the Sticky topic "Are my Autoit EXES really infected?" about 2 cms above yours! :mellow:

M23

Damn i wrote an useless post :( .

i'm really sry... Btw any suggestions about the script?

Edited by zentral
Link to comment
Share on other sites

  • Moderators

zentral,

Damn useless post

If you mean yours, I quite agree! :mellow:

As to your script, I would change it to allow for a "Cancel" button in the MsgBox and then only shut down if the user presses OK or the timeout occurs. Otherwise you are a bit stuck if you change your mind at the last second!

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

I would change the contents of your While 1 loop. With OnEventMode (or TrayOnEventMode), I only use a loop to keep the script running, but don't execute commands in it. Also, all the different functions are not required and imo not very pretty.

I would do it like:

$1 = TrayCreateItem("15 min")
TrayItemSetOnEvent(-1,"_setDelay")
$2 = TrayCreateItem("30 min")
TrayItemSetOnEvent(-1,"_setDelay")
$3 = TrayCreateItem("60 min")
TrayItemSetOnEvent(-1,"_setDelay")

While True ; Forever
    Sleep(100) ; Wait for events
WEnd

Func _setDelay()
    Switch @GUI_CTRLID
    Case $1 ; 15 min
         $tip = 15
         $delay = 900000
    Case $2 ; 30 min
         $tip = 30
         $delay = 1800000
    Case $3 ; 60 min
         $tip = 60
         $delay = 3600000
    EndSwitch
    TrayTip("Time saver", $tip & " minutes."&@CRLF&"Started at"&@HOUR&":"&@MIN&":"&@SEC, 10, 1)
    TraySetState(8)
    Sleep($delay)
    _stop()
EndFunc
Edited by dani
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...