Applescript Controlling Firewall

Hi, I am making an applescript that turns on and off the firewall without asking for a password in system prefrences and also does it without pulling up windows, so it is stealth
Here is my code so far, right now it turns on and off the firewall but it requires a password and it pops up a window so its not stealth. I would like some help on this code, Thanks.
tell application "System Preferences"
  activate
          set current pane to pane "com.apple.preference.security"
end tell
tell application "System Events"
          tell process "System Preferences"
                    click menu item "Security & Privacy" of menu "View" of menu bar 1
                    if title of button 4 of window 1 is "Click the lock to make changes." then
                              click button "Click the lock to make changes." of window 1
                    end if
                    try
                              click button "Turn On Firewall" of tab group 1 of window "Security & Privacy"
                    end try
                    set visible to false
          end tell
end tell
tell application "System Preferences" to quit

It's a known issue that apparently hasn't been fixed. Not a high priority for Apple Engineering, it seems.

Similar Messages

  • AppleScript Control over Curves Adjustment Layer

    Hi,
    I would like to create a new Curves Adjustment Layer for the current document using AppleScript.  Then, I would like to be able to manipulate the curve data from within my script.  Is this possible?  I have not found a sample that illustrates doing this.
    I am working on Photoshop CS3 Extended on a MacBook Pro.
    Thank you
    -- Bennett

    Here is a sample of a pre-built Curves Layer Adjustment. It should make some sense. In this you can see how to set 5 curve points and adjust the composite channels with the option of grouping the layer to a previous one.
    tell application "Adobe Photoshop CS2"
    activate
    set Doc_Ref to the current document
    tell Doc_Ref
    set {ah, av, bh, bv, ch, cv, dh, dv, eh, ev, group} to {0, 0, 63, 53, 124, 127, 192, 204, 255, 255, true}
    set myJS to "AdjustCurvesLayer();
    // The Adjustment Layer Recorded Function
    function AdjustCurvesLayer() {
      function cTID(s) { return app.charIDToTypeID(s); };
      function sTID(s) { return app.stringIDToTypeID(s); };
        var desc1 = new ActionDescriptor();
            var ref1 = new ActionReference();
            ref1.putClass( cTID('AdjL') );
        desc1.putReference( cTID('null'), ref1 );
            var desc2 = new ActionDescriptor();
            desc2.putBoolean( cTID('Grup'), " & group & " ); // Group to previous layer boolean
                var desc3 = new ActionDescriptor();
                    var list3 = new ActionList();
                        var desc4 = new ActionDescriptor();
                            var ref2 = new ActionReference();
                            ref2.putEnumerated( cTID('Chnl'), cTID('Chnl'), cTID('Cmps') ); // Comosite Channels
                        desc4.putReference( cTID('Chnl'), ref2 );
                            var list4 = new ActionList();
                                var desc5 = new ActionDescriptor();
                                desc5.putDouble( cTID('Hrzn'), " & ah & " ); // Point 1
                                desc5.putDouble( cTID('Vrtc'), " & av & " ); // Point 1
                            list4.putObject( cTID('Pnt '), desc5 );
                                var desc6 = new ActionDescriptor();
                                desc6.putDouble( cTID('Hrzn'), " & bh & " ); // Point 2
                                desc6.putDouble( cTID('Vrtc'), " & bv & " ); // Point 2
                            list4.putObject( cTID('Pnt '), desc6 );
                                var desc7 = new ActionDescriptor();
                                desc7.putDouble( cTID('Hrzn'), " & ch & " ); // Point 3
                                desc7.putDouble( cTID('Vrtc'), " & cv & " ); // Point 3
                            list4.putObject( cTID('Pnt '), desc7 );
                                var desc8 = new ActionDescriptor();
                                desc8.putDouble( cTID('Hrzn'), " & dh & " ); // Point 4
                                desc8.putDouble( cTID('Vrtc'), " & dv & " ); // Point 4
                            list4.putObject( cTID('Pnt '), desc8 );
                                var desc9 = new ActionDescriptor();
                                desc9.putDouble( cTID('Hrzn'), " & eh & " ); // Point 5
                                desc9.putDouble( cTID('Vrtc'), " & ev & " ); // Point 5
                            list4.putObject( cTID('Pnt '), desc9 );
                        desc4.putList( cTID('Crv '), list4 );
                    list3.putObject( cTID('CrvA'), desc4 );
                desc3.putList( cTID('Adjs'), list3 );
            desc2.putObject( cTID('Type'), cTID('Crvs'), desc3 );
        desc1.putObject( cTID('Usng'), cTID('AdjL'), desc2 );
        executeAction( cTID('Mk  '), desc1, DialogModes.NO );
    do javascript myJS show debugger on runtime error
    end tell
    end tell

  • How to reload firewall rules from command line on firewall ?

    Hi all,
    I am trying to create script that controls firewall on server. OS version is OS X Server 10.5.6.
    Part of firewall rules is created using firewall admin tools, part of Server Admin Tools. My first question is where are those rules stored permanently ? As far as I understood it should be set of ipfw rules but they are not stored in /etc/ipfilter/ipfw.conf.
    Idea of script is this:
    I have set of rules that should be controlled by Server Admin Tools.
    Also, I have some dynamic rules.
    Whenever some change occurs, I created script that does following:
    /sbin/ipfw -f flush - to flush all existing rules
    /sbin/serveradmin stop ipfilter - to stop existing firewall
    /sbin/serveradmin start ipfilter - to restart firewall and reload permanent rules
    Add my set of rules...
    After flushing all rules and issuing stop and start ipfilter none of rules set through Server Admin Tools are not reloaded. So how should I reload them ? How to save them permanently in the first place ?
    Please note that I do not have access to server (for security reasons). I am developing script on my Mac, sending to client and he tests it. So I cannot do a lot of testing.
    Thank you in advance.
    Best regards,
    Dusan

    Unix and Terminal queries are best posted to the Unix forum under OS X Technologies where those mavens frolic.

  • The volume up and down controls on my wireless keyboard show a no entry sign and do not respond when used...please help?

    The volume up and down controls on my wireless keyboard show a no entry sign and do not respond when used...please help?

    If you want to get a little more "exotic" you can try remapping the function keys.  I did a little google searching and the hits that looked promising are,
    Mapping volume and eject keys to 3rd-party keyboard Other Hardware
    Spark
    Spark is a powerful, and easy Shortcuts manager. With Spark you can create Hot Keys to launch applications and documents, execute AppleScript, control iTunes, and more...
    You can also export and import your Hot Keys library, or save it in HTML format to print it.
    Spark is free, so use it without moderation!

  • Read email message with AppleScript

    Hi!
    I just used this tip to remotely sleep my MacBook Pro:
    http://www.tuaw.com/2008/04/07/applescript-control-your-mac-with-an-e-mail/
    Now I would like that when the message comes with the subject as System and the text as Read an applescript would read what I wrote after that.
    Example:
    From: Me
    Subject: System
    Text: Sleep
    -> The computer runs applescript sleep and sleeps (so far it's working)
    From: Me
    Subject: System
    Text: Read
    -> The computer runs applescript read (that's the problem)
    How do I point the AppleScript to the received message and make it start reading?
    Is there a way to also unlock the screen (screensaver uses password)?
    Tank-you in advance for any help!

    The trick here (and the part that TUAW doesn't cover in that article) is that when a Mail rule triggers an AppleScript it passes a list of relevant messages to the script.
    Once you have that it's easy to act upon the message content.
    So instead of the simple shutdown script you write something more like:
    using terms from application "Mail"
     on perform mail action with messages theSelectedMessages for rule theRule
      repeat with eachMessage in theSelectedMessages
       -- Process the current message
       -- YOUR CODE HERE
      end repeat
     end perform mail action with messages
    end using terms from

  • Itunes connection probleme

    i can`t access itune store via my itune and safari also i`ve try the parental controle firewall and uninstall it but it stays the same, it says " no connection check you connection and retry"! but chrome and my over device work perfectly help pls

    iPhone, iPad, iPod touch: Unknown error containing '0xE' when connecting

  • Unable to connect Adobe.

    I am having a serious probelm that I couldn't solve for days.
    I have subscribed to Adobe Creative Cloud. I have installed Adobe Application Manager to my MacBookAir and it worked without any problems. Later I have installed it to my iMac and used without any problems but a few days ago it suddenly started to give error while opeening of Adobe Applicaion Manager afterwards I write my Adobe ID and Password. "Unable to connect Adobe." At the same time I tried to connect with My MacBookAir with same wireless and there is no problme either with internet connection or Abobe subscription. A few days agao I had connected to Adobe Support Chat and I had done whatever they said but the problem hadn't been resolved. I have cleared hosts file, uninstalled all Adobe applications and files and tried to reinstall, controlled firewall off but nothing solved the problem.
    I am in great problem. And for my job I need my applications. Would you please help me or give me solution ideas?

    Something is blocking communication across the network. I suspect it is something on your computer. It may be a software (anti-virus perhaps) or a firewall.
    If you connect to the internet via a proxy server, it may be blocking communications. Some details in the following thread as well: http://forums.adobe.com/message/4834130
    So, try switching off your anti-virus/firewall for a while and see if you're able to connect. Let us know how it goes.

  • Dial-up connection disconnects when importing CDs into iTunes

    When importing a CD, my dial-up Internet connection disconnects after each song has finished importing. The importing doesn't seem to be affected, but I keep having to reconnect. This is very annoying!
    Has anyone else had this problem, and how can I fix it?

    This is also a known phenomenon on Macs with a dial-up connection.
    For Macs there is a workaround, but no solution yet.
    By using an Applescript, the firewall settings will be toggled on CD insert, preventing iTunes to contact Gracenote (to get track information).
    I don't know something similar for Windows.
    Maybe you can write some code yourself.
    The URL to block (temporary) is "http://service.gracenote.com"
    You can always get the track information later by selecting all tracks of an imported CD and choosing 'Get CD Track Names' from the Advanced menu in iTunes.
    M
    17' iMac fp 800 MHz 768 MB RAM   Mac OS X (10.4.6)   Several ext. HD (backup and data)

  • I just upgraded and now Firefox will not even open!!

    Can I go back to a previous version

    What happens when you try to start Firefox?
    Some things that might be relevant depending on the answer...
    Sometimes Firefox will "hang" during startup. The process is in memory but stops working. In that case, you may need to use the Windows Task Manager to "kill" the process.
    * You can launch the Windows task manager by pressing Ctrl+Shift+Esc.
    * First check the Applications tab, then check the Processes tab (look for firefox.exe).
    * You can select the stalled item and use the End Task or End Process button. Note that if Firefox actually were in use, this could cause data loss, but since it's not yet displayed, this should be okay.
    Sometimes a program-control firewall will block an upgraded Firefox as possibly being modified by malware. In these cases, it may help to clear any references to Firefox from the firewall and have it redetect the application when you try to start it.

  • Cannot access Adobe Folio Builder using Indesign (CS6) on Windows 7, error message is 'An error has occured while trying to sign in to the Folio Builder Panel' [IMS_ERROR_FAILURE]

    Cannot access Adobe Folio Builder using Indesign (CS6) on Windows 7, error message is 'An error has occured while trying to sign in to the Folio Builder Panel' [IMS_ERROR_FAILURE]

    Yes, I can open the DPS portal via the Folio Builder panel within InDesign. Although I have created Folios locally within InDesign CS6, the DPS portal is empty and everthing greyed out with just the text "There are no folios to display. Create folios with the folio builder in InDesign".
    If I try to sign in within the Folio Builder panel in InDesign, I get the error message [IMS_ERROR_FAILURE] . In addition I am also not able to access the "Help" menu from within InDesign although I am connected to the internet.
    To complicate it even further, I am working in the UK whereas all internet control (firewall) and licences are handeled by head office in Germany. I am not sure if this is a firwewall issue or not but if the IT department in Germany could get support from Adobe to understand the access requirements, this may help.
    Hopefully using the forum someone out there will know the answer.

  • Connecting through RADIUS to install arch??

    hi everyone!
    i have one problem. i want to install arch linux, but since i live in student home, the network is supervised and controlled with kerio control firewall/AAA. each time i want to access internet i need to enter the username and password before i can access to the first page, and the session itself ends automatically if there's no traffic for some period of time, i guess 15 or 30 minutes. is there a way to enter these credentials while in bash? if not, could i somehow share the internet via usb cable from my ipad so i can login there?

    will try that, thank you oh well.. i can't complain about anything except the local network and internet service of the facility, which is really badly designed

  • Upgraded and now firefox will not open.

    I have upgraded to Firefox 7 and now I keep getting amessage that says that Firefox is having trouble restoring windows and tabs. I have shut down everything and restarted, but still get the same message.

    What happens when you try to start Firefox?
    Some things that might be relevant depending on the answer...
    Sometimes Firefox will "hang" during startup. The process is in memory but stops working. In that case, you may need to use the Windows Task Manager to "kill" the process.
    * You can launch the Windows task manager by pressing Ctrl+Shift+Esc.
    * First check the Applications tab, then check the Processes tab (look for firefox.exe).
    * You can select the stalled item and use the End Task or End Process button. Note that if Firefox actually were in use, this could cause data loss, but since it's not yet displayed, this should be okay.
    Sometimes a program-control firewall will block an upgraded Firefox as possibly being modified by malware. In these cases, it may help to clear any references to Firefox from the firewall and have it redetect the application when you try to start it.

  • Javascript Print Dialog

    I'm new to applescript and I am trying to automate printing a page using the "Print Page" button provided on the page. I have found the javascript that invokes the print dialog but when I try to use something like keystroke return to go through the page setup and then the print screen it doesn't seem to work. The script seems to wait until the JavaScript opened page setups and print dialogs are closed.
    Anyone had any luck?
    Here's my code:
    tell application "Safari" to activate
    repeat 1 times
    tell application "Safari"
    do JavaScript "Sl.NR();return false;" in document 1
    end tell
    delay 1
    tell application "System Events"
    keystroke return
    delay 1
    keystroke return
    end tell
    delay 5
    tell application "Safari"
    do JavaScript "_3.Mz.Nb();return false;" in document 1
    end tell
    end repeat
    Also I can't seem to select the safari window after this - do I need to free safari from applescripts control?

    This is a question for the application forum for Acrobat since it has to do its JavaScript implementation - try there.

  • I have downloaded firefox but it will not launch why?

    I had Firefox and it crashed. It would never launch again. I then removed it from my laptop and restarted. I then downloaded it again. Same results. What is going on? Today I downloaded again and it launched but now when I open my computer again, it will not launch.

    I'm not sure if it came up while you were posting your question, but there are several troubleshooting suggestions in this article: [[Firefox won't start - find solutions]].
    Could you try starting Firefox in its Safe Mode? That's a standard diagnostic tool to deactivate extensions and some advanced features of Firefox. More info: [[Troubleshoot Firefox issues using Safe Mode]].
    Hold down the Shift key when starting Firefox. A small dialog should appear. Click "Start in Safe Mode" (''not'' Reset).
    Will Firefox start up?
    Sometimes a strict "program control" firewall or malware will stop Firefox from running. You can investigate these possibilities further using the steps/tools in these articles:
    * [[Configure firewalls so that Firefox can access the Internet]]
    * [[Troubleshoot Firefox issues caused by malware]]

  • Shortcuts over Screen Sharing

    Hello,
    I am using Screen Sharing to remote control a machine that can handle tasks that my MBP cannot.
    It allows me to do everything from the keyboard/pad of my MBP, no extra interfaces, which is very handy, I love it.
    The only issue I encounter is with the use of keyboard shortcuts - while "in" Screen Sharing, some shortcuts apply to the master machine (e.g. iTunes default shortcuts) and some others to the slave machine (e.g. Finder "delete" shortcut).
    What's the rule, how does it work?
    I did set up a series of custom shortcuts via Quicksilver to run Applescripts controlling iTunes, and I'd like to have them working (=taking effect on the master machine) while being in Screen Sharing, which is not the case at the moment.
    Any idea on how to achieve that?
    Thanks a lot in advance,
    Adrien

    I've been complaining about this problem for a long time too. Just bought a new Mini X Server which I would like to run headless. It's silly that Time Machine won't redraw properly - actually making TM more or less useless if you are accessing it using VNC or Time Machine.
    Come on Apple...

Maybe you are looking for

  • Credit check for existing Verizon customer

    Hello!  I am looking for some assistance.  I recently received an email from BB about a 2500 point Reward Zone bonus for buying a new phone w/ a two year plan.  I am currently on my mother-in-law's family plan but due for an upgrade.  After going thr

  • Documents on Migration from XI 2.0 to XI 7.0

    HI, I read in SAP help that we have to first migrate to XI 3.0 from 2.0 and then only we can migrate to XI 7.0. If any one having any documents or experiences on the same can share their knowledge on the same. Any help on this will be highly apprecia

  • About o-r mapping

    Hi all, I have two questions when creating database scheme: 1, kodo use a default FlatInheritanceMapping to mapping class inheritance hierachy to a RDMS.But this is not always a practic way.In most time we mapping every leaf class in the hierachy to

  • Apparent code generation error in AIR 16 AOT

    I have a fairly large project that seems to run well under AIR 16 except for a library that is throwing an error.  The library is D.eval-1.1.swc. D.eval is a library for simulating the eval function of AS2 in AS3.   Our program uses it for runtime sc

  • DownStream configuration questions

    Hello, I've some questions about the GG downstream configuration. When a downstream server is configured, the extraction process must make two connections: 1.to the source database 2. To the Downstream database I understand that the connection to the