Programming on a mac

Discussion in 'Mac Programming' started by Will283754823758, Nov 1, 2015.

  1. Will283754823758 macrumors newbie

    Joined:
    Nov 1, 2015
    #1
    Hi, i know this post might not be suitable but i just need an answer. ive just got a mac for the first time and its sort of confusing. Ive made a few programs on windows using visual studio. one of which (for educational purposes) takes a screenshot every 30 seconds without the user knowing and emails it to me in an attachment. I did that in vs using C#. Is something like this possible with a mac? i heard they dont get viruses and i cant download VS for mac. so if i find another dev environment, can i use that to program in c# or java or something? then if i can do that, would i be able to run and hide the program? would it then be able to take a screenshot and save it to a hidden folder? then would i be able to make it email me it? im just trying to find the breakpoint. if someone could give me a bit of an insight that would be fantastic
     
  2. Red Menace macrumors 6502

    Red Menace

    Joined:
    May 29, 2011
    Location:
    Littleton, Colorado, USA
    #2
    Apple's development environment is Xcode, which is available in the App Store (free, but a gigantic download), and their languages of choice are Swift (newer) and Objective-C (been around for a while). You can do pretty much anything with Xcode, but something like you are talking about wouldn't have a chance of getting in the App Store.

    The whole viruses thing is way overblown - there aren't many true viruses around for any platform, and just being aware goes a long way in securing your machine. Malware such as Trojans, phishing, and compromised web servers are the big ones these days.
     
  3. Will283754823758 thread starter macrumors newbie

    Joined:
    Nov 1, 2015
    #3

    thanks i will download xcode. but in terms of getting what i develop on the appstore, do i need to? if i make a game, can i put it on my usb and install it on my friends mac?
     
  4. ArtOfWarfare macrumors G3

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #4
    You can use C# on OS X, but the runtime used on Windows (the Common Language Runtime) isn't available, so you'll have to use Mono instead. Not sure what kind of implications that'll have - I don't have much experience with C# (I mostly just use the language when I'm playing with Unity.)
     
  5. kryten2 macrumors 6502a

    Joined:
    Mar 17, 2012
    Location:
    Belgium
    #5
    Why not use a shell script and launch agent for taking a screenshot every 30 secondes and emailing it to you?
    Take a look at the man pages of the following commands : screencapture, mail, uuencode.
     
  6. superscape macrumors 6502a

    superscape

    Joined:
    Feb 12, 2008
    Location:
    East Riding of Yorkshire, UK
    #6
    Yup. I agree with Kryten.

    You could get this done in Xcode but there's a steep learning curve and what you want to achieve is probably easier as a short shell script. Once you have your script written (Kryten has pointed you in the right direction for that one already), you can schedule it as necessary using a Launch Agent. They can be a bit fiddly to start with so make sure you read the documentation here:

    https://developer.apple.com/library...stemStartup/Chapters/CreatingLaunchdJobs.html
    https://developer.apple.com/library...l/BPSystemStartup/Chapters/ScheduledJobs.html

    Hope that's of some help
     
  7. lympero macrumors 6502a

    lympero

    Joined:
    Sep 1, 2008
    Location:
    Arta, Greece
    #7
    You can also use parallels and install Windows and visual studio
     
  8. gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #8
    You get everything you need to install apps that you wrote on your or your friends Macs, iPhones, or iPads.
     
  9. hiddenmarkov macrumors 6502a

    Joined:
    Mar 12, 2014
    Location:
    Japan
    #9
    Your issue won't be virus, it will be other sections of computer legal code tbh. Educational or not you are creating hidden folders, starting up mail services among others. Tread carefully here. you are crossing over into many areas. At work even as an admin I agree to terms of duties. I don't do many things bordering on network attacks and such without approval from network and security manager. And its my job to do this...but I make sure my bosses are aware and approve.

    Take aways is make sure your users know this code is in there and what it does. bad things can happen otherwise.


    Beyond that, you will have to either learn to veer from C# or you can run it in virtual. Vmware and parallels in latest revs have gone to support this pretty good (windows and the vstudio support are key marketing points for them of late, as are docker and such support). Lots of languages to use, they would not need Xcode if not C (variants) or swift. Or go Xcode and learn C (swift) in the mac realm. World is yours here. Nice things is Xcode free, no costs involved.
     
  10. Will283754823758 thread starter macrumors newbie

    Joined:
    Nov 1, 2015
    #10
    thanks everyone for your advice and info. ive read it all and taken it all in. im going to download xcode and start developing :)
     
  11. 960design macrumors 68020

    Joined:
    Apr 17, 2012
    Location:
    Destin, FL
    #11
    So I write code for about 12 - 16 hours a day. That would be a HUGE number of emails for some poor sap. I have no idea why you would want to do something like this, but it seems pretty primative. If I may, I recommend reading up on something like ARD ( Apple Remote Desktop ), it may be a better solution for you.
    While technically true, you can still download something dangerous and destroy your mac if you change a few settings and ignore about five modals telling you that you are about to do something dangerous.
    Eclipse will do java just fine.
     
  12. superscape macrumors 6502a

    superscape

    Joined:
    Feb 12, 2008
    Location:
    East Riding of Yorkshire, UK
    #12
    Does anyone else have a slightly uneasy feeling about this thread? It feels like we're helping someone do something nefarious. Asking about viruses, bypassing security, covert monitoring... Hmmm...

    Installing something that logs what a user's doing without their knowledge seems at best a touch unethical, and at worst possibly illegal. Of course, if you're a genuine and official administrator, with permission to do that sort of monitoring then maybe, as 960design suggests, there are tools like Remote Desktop, Casper etc that could be better solutions.

    Of course, maybe you're doing something legitimate that just *looks* questionable since we don't have the full picture. What actual problem are you trying to solve?
     
  13. ArtOfWarfare macrumors G3

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #13
    I've done this exact application in Automater before. There's a function to take a screenshot and another to send an email. Then you just schedule it to run every however often (emailing once every 30 seconds is bad. So is once every 5 minutes. Every 30 seconds means 120 per hour and 2880 per day. Your inbox will be completely full within a few days.)
     
  14. 960design macrumors 68020

    Joined:
    Apr 17, 2012
    Location:
    Destin, FL
    #14
    That's a great idea. Take screenshots over time and email once every couple of hours the collection using Automator.
     
  15. Beachguy macrumors 6502a

    Beachguy

    Joined:
    Nov 23, 2011
    #15
    Personally, I find this remarkably creepy and am surprised that there has been little resistance to this question.
     
  16. ArtOfWarfare macrumors G3

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #16
    Why would there be? He's not asking about how to make it difficult to tell the program is running. He's not asking how to remotely install it on other people's machines. He's not asking how to break into someone else's account.

    This is a straightforward learning exercise in computer automation.
     
  17. Beachguy macrumors 6502a

    Beachguy

    Joined:
    Nov 23, 2011
    #17
    Having something sitting which takes and forwards screenshots IS creepy- and brings to mind malware and snooping.
     
  18. superscape macrumors 6502a

    superscape

    Joined:
    Feb 12, 2008
    Location:
    East Riding of Yorkshire, UK
    #18
    That's what I thought. As an exercise in learning automation, I guess it has some merit. Otherwise, it seems a bit questionable.
     
  19. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #19
    And yet, there are commercial tools that do just that and more. e.g. http://spectorsoft.com. I've seen first hand what that can do and it's downright scary.

    B
     
  20. superscape, Nov 6, 2015
    Last edited: Nov 6, 2015

    superscape macrumors 6502a

    superscape

    Joined:
    Feb 12, 2008
    Location:
    East Riding of Yorkshire, UK
    #20
    Indeed. Even they're very careful to cover themselves, from their site:

    If you want to do that sort of monitoring then you need to be really careful from a legal and ethical standpoint. I know that here in the UK, if you monitor an employee without their contract specifically saying that they agree to being monitored then they can resign and sue for unfair dismissal.

    I'm reasonably sure there's a Spyware Act in the USA that means up to 5 years in jail for installing spyware on someone else's computer without their permission.

    From a management point of view, I'd suggest that monitoring should be an absolute last resort. It can have a massively detrimental effect on morale. There's often a better way to solve the root problem.

    So, I guess that if you're monitoring *with* someone's permission then you're fine, but be super careful that you can present evidence of that permission if you have to. If you're monitoring *without* someone's permission then you could well be breaking the law.
     

Share This Page