Created
July 21, 2017 11:30
-
-
Save aziascreations/cacc5aff924e05211b2b17d8ade62f5c to your computer and use it in GitHub Desktop.
Albanian Virus
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"syscall" | |
"unsafe" | |
) | |
var ( | |
user32, _ = syscall.LoadLibrary("user32.dll") | |
messageBox, _ = syscall.GetProcAddress(user32, "MessageBoxW") | |
) | |
const ( | |
MB_UINTPTR = 0x00000013 | |
MB_TITLE = "Virus Alert !" | |
// Couldn't find a way to easily make this a multi-line "statement" | |
MB_TEXT = "Hi, I am an Albanian virus but because of poor technology in my country unfortunately I am not able to harm your computer. Please be so kind to delete one of your important files yourself and then forward me to other users. Many thanks for your cooperation! Best regards,Albanian virus" | |
) | |
func MessageBox(caption, text string, style uintptr) (result int) { | |
var nargs uintptr = 4 | |
ret, _, callErr := syscall.Syscall9(uintptr(messageBox), | |
nargs, | |
0, | |
uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(text))), | |
uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(caption))), | |
style, | |
0, | |
0, | |
0, | |
0, | |
0) | |
if callErr != 0 { | |
// Do something ? | |
} | |
result = int(ret) | |
return | |
} | |
func main() { | |
defer syscall.FreeLibrary(user32) | |
MessageBox(MB_TITLE, MB_TEXT, MB_UINTPTR) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
title.s = "Virus Alert !" | |
text.s = "Hi, I am an Albanian virus but because of poor technology in my country unfortunately I am not able to harm your computer. Please be so kind to delete one of your important files yourself and then forward me to other users. Many thanks for your cooperation! Best regards,Albanian virus" | |
MessageRequester(title, text, 19) | |
; IDE Options = PureBasic 5.30 (Windows - x64) | |
; CursorPosition = 3 | |
; EnableUnicode | |
; EnableXP | |
; Executable = albanian-virus-pb.exe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment