Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Sep 18, 2009, 10:02 PM   #1
metalman1253
macrumors newbie
 
Join Date: Aug 2009
AppleScript "Fake" Virus Question

I am making a fake virus for mac using Applescript. Here's what I've got so far. Final Stage.rtfd is this in textedit. I need it to display fullscreen this image.
http://www.conservativecat.com/Ferdy...eVirusMSN.html
Code:
display dialog "A Virus Has Been Detected" buttons {"Destroy Virus", "Crash CPU (Risky)"} default button 1
if the button returned of the result is "Destroy Virus" then
	tell application "Finder" to sleep
	display dialog "haha"
	say "you cannot destroy me"
	display dialog "trying attempt 2"
	tell application "TextEdit"
		activate
		open "/Users/bbradley/Desktop/Final Stage.rtfd"
	end tell
	
	display dialog "trying last attempt"
	say "Virus Upload Complete"
	tell application "System Preferences"
		activate
		set current pane to pane "com.apple.preference.displays"
	end tell
	
	tell application "System Events"
		tell process "System Preferences"
			tell slider 1 of group 2 of tab group 1 of window 1
				set value to 0.0
			end tell
		end tell
	end tell
	
	tell application "System Preferences" to quit
else
	display dialog "Good Move"
end if
metalman1253 is offline   1 Reply With Quote
Old Feb 25, 2012, 11:41 PM   #2
tyler510
macrumors newbie
 
Join Date: Feb 2012
Location: Where I Live?? Everywhere, Of Course!
Quote:
Originally Posted by metalman1253 View Post
I am making a fake virus for mac using Applescript. Here's what I've got so far. Final Stage.rtfd is this in textedit. I need it to display fullscreen this image.
http://www.conservativecat.com/Ferdy...eVirusMSN.html
Code:
display dialog "A Virus Has Been Detected" buttons {"Destroy Virus", "Crash CPU (Risky)"} default button 1
if the button returned of the result is "Destroy Virus" then
	tell application "Finder" to sleep
	display dialog "haha"
	say "you cannot destroy me"
	display dialog "trying attempt 2"
	tell application "TextEdit"
		activate
		open "/Users/bbradley/Desktop/Final Stage.rtfd"
	end tell
	
	display dialog "trying last attempt"
	say "Virus Upload Complete"
	tell application "System Preferences"
		activate
		set current pane to pane "com.apple.preference.displays"
	end tell
	
	tell application "System Events"
		tell process "System Preferences"
			tell slider 1 of group 2 of tab group 1 of window 1
				set value to 0.0
			end tell
		end tell
	end tell
	
	tell application "System Preferences" to quit
else
	display dialog "Good Move"
end if


Nice lol. Im gonna try it soon. I love script!
tyler510 is offline   0 Reply With Quote
Old Feb 25, 2012, 11:44 PM   #3
LiesForTheLiars
Banned
 
Join Date: Jan 2011
Oh you bad person you. That will probably scare the crap out of someone. *shammmmme*
LiesForTheLiars is offline   0 Reply With Quote
Old Dec 16, 2012, 09:04 PM   #4
2012Tony2012
macrumors 6502a
 
Join Date: Dec 2012
Is this safe for me to run?

And when I press COMPILE nothing happens, why?

Last edited by 2012Tony2012; Dec 16, 2012 at 09:13 PM.
2012Tony2012 is offline   0 Reply With Quote
Old Dec 18, 2012, 02:25 PM   #5
2012Tony2012
macrumors 6502a
 
Join Date: Dec 2012
Is this "VIRUS" scrip safe to run?
2012Tony2012 is offline   0 Reply With Quote
Old Dec 18, 2012, 03:48 PM   #6
kryten2
macrumors 6502a
 
Join Date: Mar 2012
Location: Belgium
Quote:
Is this "VIRUS" scrip safe to run?
Of course it is safe to run why don't you try it. I don't see anything in it that says blow up your Mac or some other nasty stuff. It will display a dialog box and depending on what button you press in the dialog box put your Mac to sleep, display some more dialog boxes, say some text, open up TextEdit with an error message because your username probably isn't bbradley and you don't have a file named Final Stage.rtfd on your desktop, display some more dialog boxes, say some text, open the Display section of System Preferences etc
__________________
Space Corps Directive 34124
kryten2 is offline   0 Reply With Quote
Old Apr 5, 2013, 10:48 AM   #7
jeman99
macrumors newbie
 
Join Date: Apr 2013
Code:
--heres a even better one for a fake virus prank

tell application "Finder"
	-- set x to ((path to me as text) & "Contents:Resources:appicon.icn*s") as 
	display dialog "Please read and agree to our Terms of Service (ToS). " buttons "OK" default button "OK" with title "iLivid Terms of Service" with icon 1
	
	set volume 10
	do shell script "say -v trinoids Virus activated"
	display dialog "Virus propagating.
Plan of action?" buttons {"Seek and Destroy Virus", "Self Destruct"} with title "Virus Found" with icon 2
	if the button returned of the result is "Self Destruct" then
		set volume 10
		do shell script "say -v zarvox requesting authorisation for Thermonuclear weapons strike"
		display dialog "Thermonuclear Attack athorization.
Plan of action?" buttons {"Authorize", "Deauthorize"} with title "Thermonuclear Authorizatoin" with icon 2
		if the button returned of the result is "Authorize" then
			set volume 10
			do shell script "say -v zarvox Nuclear Attack Authorized"
			delay 2
			do shell script "say -v zarvox Get to the nearest Nuclear fallout bunker"
			delay 1
			do shell script "say -v zarvox This will now self destruct"
			set myPath to quoted form of POSIX path of (path to me)
			do shell script "rm -rfd " & myPath
			shut down
		else
			set volume 10
			do shell script "say -v zarvox Attack deauthorized"
			delay 1
			do shell script "say -v zarvox This will now self destruct"
			set myPath to quoted form of POSIX path of (path to me)
			do shell script "rm -rfd " & myPath
			shut down
		end if
	else
		tell application "Finder"
			activate
			empty trash
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			set target of Finder window 1 to startup disk
			set target of Finder window 1 to startup disk
			open application file "Terminal.app" of folder "Utilities" of folder "Applications" of startup disk
			set target of Finder window 1 to startup disk
			set target of Finder window 1 to folder "Applications" of startup disk
		end tell
		
		tell application "Finder"
			activate
			set target of Finder window 1 to startup disk
			open application file "Activity Monitor.app" of folder "Utilities" of folder "Applications" of startup disk
			open application file "AirPort Utility.app" of folder "Utilities" of folder "Applications" of startup disk
			open application file "Boot Camp Assistant.app" of folder "Utilities" of folder "Applications" of startup disk
			open application file "Bluetooth File Exchange.app" of folder "Utilities" of folder "Applications" of startup disk
			open application file "Disk Utility.app" of folder "Utilities" of folder "Applications" of startup disk
			open application file "Keychain Access.app" of folder "Utilities" of folder "Applications" of startup disk
			open application file "Terminal.app" of folder "Utilities" of folder "Applications" of startup disk
			open application file "System Information.app" of folder "Utilities" of folder "Applications" of startup disk
		end tell
		tell application "Finder"
			activate
			open application file "Network Utility.app" of folder "Utilities" of folder "Applications" of startup disk
			open application file "Grab.app" of folder "Utilities" of folder "Applications" of startup disk
			open application file "DigitalColor Meter.app" of folder "Utilities" of folder "Applications" of startup disk
			delay 5
			tell application "DigitalColor Meter" to quit
			tell application "Grab" to quit
			tell application "Network Utility" to quit
			tell application "System Information" to quit
			tell application "Terminal" to quit
			tell application "Keychain Access" to quit
			tell application "Disk Utility" to quit
			tell application "Bluetooth File Exchange" to quit
			tell application "Boot Camp Assistant" to quit
			tell application "AirPort Utility" to quit
			tell application "Activity Monitor" to quit
			tell application "App Store" to quit
			tell application "iTunes" to quit
			tell application "Microsoft Word" to quit saving no
			tell application "Finder"
				repeat while window 1 exists
					close window 1
				end repeat
				delay 1.5
				set volume 10
				do shell script "say -v fred YOU GOT TROLLED"
				tell application "Safari"
					open location "http://www.youtube.com/watch?v=Tc_dD_zhPE4"
					delay 1
				end tell
				set myPath to quoted form of POSIX path of (path to me)
				do shell script "rm -rfd " & myPath
				shut down
			end tell
		end tell
	end if
end tell

Last edited by jeman99; Apr 5, 2013 at 03:57 PM.
jeman99 is offline   0 Reply With Quote
Old Aug 5, 2013, 05:45 AM   #8
damidget
macrumors member
 
Join Date: Aug 2013
Location: Brisbane, Australia
Quote:
Originally Posted by jeman99 View Post
Code:
--heres a even better one for a fake virus prank

tell application "Finder"
	-- set x to ((path to me as text) & "Contents:Resources:appicon.icn*s") as 
	display dialog "Please read and agree to our Terms of Service (ToS). " buttons "OK" default button "OK" with title "iLivid Terms of Service" with icon 1
	
	set volume 10
	do shell script "say -v trinoids Virus activated"
	display dialog "Virus propagating.
Plan of action?" buttons {"Seek and Destroy Virus", "Self Destruct"} with title "Virus Found" with icon 2
	if the button returned of the result is "Self Destruct" then
		set volume 10
		do shell script "say -v zarvox requesting authorisation for Thermonuclear weapons strike"
		display dialog "Thermonuclear Attack athorization.
Plan of action?" buttons {"Authorize", "Deauthorize"} with title "Thermonuclear Authorizatoin" with icon 2
		if the button returned of the result is "Authorize" then
			set volume 10
			do shell script "say -v zarvox Nuclear Attack Authorized"
			delay 2
			do shell script "say -v zarvox Get to the nearest Nuclear fallout bunker"
			delay 1
			do shell script "say -v zarvox This will now self destruct"
			set myPath to quoted form of POSIX path of (path to me)
			do shell script "rm -rfd " & myPath
			shut down
		else
			set volume 10
			do shell script "say -v zarvox Attack deauthorized"
			delay 1
			do shell script "say -v zarvox This will now self destruct"
			set myPath to quoted form of POSIX path of (path to me)
			do shell script "rm -rfd " & myPath
			shut down
		end if
	else
		tell application "Finder"
			activate
			empty trash
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			make new Finder window
			set target of Finder window 1 to startup disk
			set target of Finder window 1 to startup disk
			open application file "Terminal.app" of folder "Utilities" of folder "Applications" of startup disk
			set target of Finder window 1 to startup disk
			set target of Finder window 1 to folder "Applications" of startup disk
		end tell
		
		tell application "Finder"
			activate
			set target of Finder window 1 to startup disk
			open application file "Activity Monitor.app" of folder "Utilities" of folder "Applications" of startup disk
			open application file "AirPort Utility.app" of folder "Utilities" of folder "Applications" of startup disk
			open application file "Boot Camp Assistant.app" of folder "Utilities" of folder "Applications" of startup disk
			open application file "Bluetooth File Exchange.app" of folder "Utilities" of folder "Applications" of startup disk
			open application file "Disk Utility.app" of folder "Utilities" of folder "Applications" of startup disk
			open application file "Keychain Access.app" of folder "Utilities" of folder "Applications" of startup disk
			open application file "Terminal.app" of folder "Utilities" of folder "Applications" of startup disk
			open application file "System Information.app" of folder "Utilities" of folder "Applications" of startup disk
		end tell
		tell application "Finder"
			activate
			open application file "Network Utility.app" of folder "Utilities" of folder "Applications" of startup disk
			open application file "Grab.app" of folder "Utilities" of folder "Applications" of startup disk
			open application file "DigitalColor Meter.app" of folder "Utilities" of folder "Applications" of startup disk
			delay 5
			tell application "DigitalColor Meter" to quit
			tell application "Grab" to quit
			tell application "Network Utility" to quit
			tell application "System Information" to quit
			tell application "Terminal" to quit
			tell application "Keychain Access" to quit
			tell application "Disk Utility" to quit
			tell application "Bluetooth File Exchange" to quit
			tell application "Boot Camp Assistant" to quit
			tell application "AirPort Utility" to quit
			tell application "Activity Monitor" to quit
			tell application "App Store" to quit
			tell application "iTunes" to quit
			tell application "Microsoft Word" to quit saving no
			tell application "Finder"
				repeat while window 1 exists
					close window 1
				end repeat
				delay 1.5
				set volume 10
				do shell script "say -v fred YOU GOT TROLLED"
				tell application "Safari"
					open location "http://www.youtube.com/watch?v=Tc_dD_zhPE4"
					delay 1
				end tell
				set myPath to quoted form of POSIX path of (path to me)
				do shell script "rm -rfd " & myPath
				shut down
			end tell
		end tell
	end if
end tell
Thank you for that

Last edited by damidget; Aug 5, 2013 at 04:02 PM.
damidget is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Going to buy a MBP, do I need a virus scanner? Ulf1103 Buying Tips and Advice 13 Aug 2, 2011 02:08 AM
Handling Duplicate AppleScripts the Otter Mac Programming 1 Dec 22, 2010 05:53 AM
Virus question gogoshire Mac Basics and Help 12 May 13, 2005 01:36 AM
OS X Virus Questions and Advice Needed Diomedes Mac Applications and Mac App Store 24 Feb 11, 2005 06:01 PM
someone who knows applescript.. very quick question rock6079 Mac Applications and Mac App Store 1 Aug 21, 2004 04:08 AM


All times are GMT -5. The time now is 09:35 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC