Request - Perl script that can parse an ACE config from a VIP

Has anyone ever written a Perl script that can take the VIP from an ACE config and parse it out into the component parts of the config, ACLs, NATs, Class-map, policy-map, etc. ?
This seems like something someone must have written already.
Thanks in advance!

Any reason you dont want to use XML instead of doing just PERL ?  Its lot easier to do with XML scripts as ACE has a XML interface to query whatever is needed. So that said, you can use a perl to interface ACE via XML. Here's a simple Perl that uses LibCurl:
#!/usr/bin/perl
use WWW::Curl::Easy;
my $numArgs = $#ARGV + 1;
if ($numArgs<4)
die("Usage: shusers.pl ip_address username password command\n");
my $ip = @ARGV[0];
my $uname = @ARGV[1];
my $pwd = @ARGV[2];
my $cmd = @ARGV[3];
my $curl = new WWW::Curl::Easy;
my $posturl = "http://$ip/bin/xml_agent/";
my $xml_cmd = "xml_cmd=<$cmd/>";
$curl->setopt(CURLOPT_HEADER, 0);
$curl->setopt(CURLOPT_FRESH_CONNECT, 1);
$curl->setopt(CURLOPT_URL, $posturl);
$curl->setopt(CURLOPT_RETURNTRANSFER,1);
$curl->setopt(CURLOPT_USERPWD,"$uname:$pwd");
$curl->setopt(CURLOPT_POST,1);
$curl->setopt(CURLOPT_POSTFIELDS, $xml_cmd);
$curl->perform;
my $info = $curl->getinfo(CURLINFO_RESPONSE_CODE);
print $info;
Hope this helps.
Cheers
V.K

Similar Messages

  • Does anyone have a perl script that can submit a proxy request to iplanet proxy server with basic authentication? We want to do content verification using BigIP.

     

    Hi, Dave.
    If you're using the BlackBerry browser, you can't configure anything to bypass the RIM servers.  I believe you may do so by using the Opera browser, but I haven't tried it myself so cannot comment with authority.
    I hope that clears up the issue for you. 
    - If my response has helped you, please click "Options" beside my post and mark it as solved. Clicking the "thumbs up" icon near the bottom of my response would also be appreciated.

  • I want to know how to create a new script that can be run in batch proces in Photoshop Element 11 ?

    I want to know how to create a new script that can be run in batch proces in Photoshop Element 11 ?

    Have a look at the menu file/process multiple files. You can choose to add your signature (or the caption) to the image and export the new files.
    If that solution is not flexible enough, consider using the very affordable (12$)  Elements+ add-on which offers a 'meta stamp' script :
    http://elementsplus.net/v5/en/meta-stamp.htm
    Otherwise, have a look at other free and good solutions like Faststone Photoresizer, Xnview...

  • A script that can be used to track text content changes in indesign?

    Is there a possibility a script that can be used to track text content changes in indesign. My Indesign software's version is CS3. As you can see below, I have deleted some texts and added some. I did it in another software.
    I have been searched for a long time. Because of my poor English, I still can't come up with any Object Model related to the script yet.
    Here is some idea of mine:
    Use the script tracking my revising texts. When I  add some new texts, the texts will be underlined. When I delete some texts, the position of the first character of the removed text will be added a small red triangle or something.
    Thanks in advance.

    Hidden dragon, what does that mean?
    I can't comprehend fully what you said.
    Is IDML short for Indeisgn Markup Language?
    I think you are telling me that I can open the Indeisgn document by using the software InCopy. Then I have change some contents. InCopy will help me tracking the revision.
    getZinger. Do I get your point?

  • Can you recommend some tools that can parse XQuery?

    I need a tool that can parse an xquery and manipulate the internal blocks of it. Can somebody please help me? Thanks!

    Back in the day I used to use this: http://www.analogx.com/contents/download/audio/tagm.htm (freeware).
    Depending on how large your collection is, the program might run slower, still, it was a good program for what it does.

  • What is available on new Windows servers that allow you to write scripts that can work directly with Windows, SQL Server, and Exchange Server?

    What is available on new Windows servers that allow you to write scripts that can work directly with Windows, SQL Server, and Exchange Server?
    a. PowerShell
    b. isql
    c. osql
    d. sqlcmd

    All questions seem to be from the interview or a test. I think I even took this test once, it's KForce test.
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • How can we restrict the type of components that can be dragged and dropped from the sidekick CQ

    how can we restrict the type of components that can be dragged and dropped from the sidekick CQ

    Generally drop the components at parasys. The components allowed on the parsys is control via the design mode of the page.So restrict components at the design of the parsys. http://dev.day.com/docs/en/cq/current/wcm/working_with_cq_wcm/using_edit_designandpreviewm odes.html#Design%20Mode

  • I have perl scripts that I want to be able to run with my iplanet web server 6.0. How can I make it work in Windows NT? (Because I have no problem when I use it with Linux).

     

    Hi Melanie,
    In order to run a PERL script under Windows NT the iPlanet Web Server needs to know where to find the PERL interpreter.
    follow these steps :
    1) Make sure Windows NT knows what a .pl file is. In file Manager click on file and choose associate from the menu. Check the "files with extension" drop-down list for pl - if it exists verify that it is pathed to your perl.exe. If it is not already on the list click the "New Type" button. In the Filetype box put pl. Choose open from the Action drop-down list. In the Command box specify the full path to your perl.exe interpreter (Make sure to use short filenames, rather than long filenames.) Click the OK button. Then click the Close button in the main Associate dialog box. Double click a .pl file to test - it should automatically launch the PERL interpreter and feed it your .pl file.
    2) Create a directory to contain your .pl scripts.
    ~server_root\shell-cgi is a good choice.
    or \cgi-bin\
    NOTE: Make very sure that this directory is NOT part of the document root, it should have it's own directory (preferably at the same level of the docroot).
    3) In the Admin Server select Programs.
    4) Choose CGI directory (normally) or WinCGI directory or ShellCGI Directory depending on ur choice from the Programs menu.
    5) Put the URL Prefix you would like to map to your Shell-CGI directory into the URL Prefix field.
    6) Put the full path to your Shell-CGI directory in the Shell CGI directory field.
    7) Click OK.
    8) The save and apply changes page will display your changes and give you the opportunity to verify them. If they are correct click the Save and Apply button. If not Click the Undo button and go back to step 4.
    (9)You can then call your .pl scripts directly by referencing the directory mapping that you have just created. For example:
    http://my.server.whatever/shell-cgi/ myscript.pl
    this should work now.
    If not Pls Mail me.
    regards
    T.Raghulan
    [email protected]

  • Can an Applet call a Perl script that performs Unix file commands?

    Hi,
    I would like my applet to move a Unix file from one directory to another. (Both directories and the file are on the same server as the applet).
    In my applet I have code that calls (I think) a Perl script through a URL connection and passes the name of the file that needs to be moved:
    URL urlMove = new URL("http://myserver.com/cgi-bin/fileMove.pl?" + fileToMove);
    URLConnection urlConn = urlMove.openConnection();
    In the cgi-bin I have a perl script (fileMove.pl) that performs the move:
    #!/usr/bin/perl
    use CGI qw(:standard);
    $pfile = $ENV{?QUERY_STRING?};
    $cmd = ?mv stageArea/$pfile $pfile?;
    system $cmd;
    The Perl script works fine when I call it directly from Internet Explorer, but when I call the script from the Applet the file is not moved. Am I doing something wrong?

    Got it to work!
    Changed the Java code to:
    URL urlMove = new URL("http://myserver.com/cgi-bin/fileMove.pl?" + fileToMove);
    urlMove.openConnection();
    InputStream moveStream = urlMove.openStream();
    and in the Perl script added the line:
    print "Content-Type: text/html\n\n";
    The applet running my a PC is now effortlessly moving files on the unix server, wahoo.
    Aside: I also found that my applet web server and the files the applet reads/writes do not have to be on the same machine. In the applet's cgi-bin directory I created a "link" to the networked unix directory where the image files are actually located. I really expected the Applet I/O Security to complain, but it work like a charm. Go figure.

  • I need a script that can save images in whatever directory they reside in

    I am working on a project where I have over 1500 directories that have multiple .TIF images in each one. I am looking for a solution where I can run a script (which may or may not call on actions) that allows me to save each .TIF as a .PSD and again as a .PNG (with specific optimization settings) in the same directory as the original .TIF. The main idea here is I need to be able to run the script and walk away. So I'm looking for a one press option for each directory.
    I can create an action that saves the files in the proper format but when I record the action it saves the file in "folder 1". When I run this action again on "folder 2" it saves the images in "folder 1."  I could certainly make adjustments in the "Batch" dialog box by choosing the over ride "save as" function but the goal is to not have to do that 1500 times.
    So, my question is, is there a single script out there that can save images next to the original .TIFFS regardless of what directory the reside in? I'm no scripting guru, but perhaps the code uses something with a "this" command to specify the folder to save images to? Is this even possible? If so, are there web sites I can buy this from? Is there a scripting community that can provide these services?
    Any help to point me in the right direction is much appreciated.
    Mike

    You could try my Picture Processor ...
    http://www.ps-scripts.com/bb/viewtopic.php?f=10&t=3409&sid=3925f7039423a428ed082feba2c0aee 9
    Use the second download.

  • Maximum XML file size that can parsed with c++ XML parser

    Hi!
    what is the maximum file size that can be parsed using the xml parser(version 1) for c++ on linux .
    i'm getting an error(error no 231) when i try to parse an XML file of 3MB on Red Hat Linux 6.1
    Regards
    anjana

    moving to xml db forum

  • Create a script that can create entire schema with data when run

    Hi,
    I need to create a script that creates the entire schema on a database when the script is run. the need is that the script should be capable of creating all schema objects with grants and all, including the table data.
    The same objective can be achived through export / import.But we don't want to deliver the dump files instead a script which will be executed on a database created with same database stucture of tablespaces etc.
    I have serched the net but yet to achive the goal.
    Is there any oracle utility / script file that can do this for me ?
    Can Oracle import be used to create the same, the way it is used to create index File ?
    Please suggest !!
    Regards

    You should look at the package dbms_metadata to be able to extract all ddl to recreate a schema. To load the data, you could write scripts that will generate insert statements and spool these to a file (sql generating sql), or you could write scripts that generates a delimited file and use sql loader to load the data into the target system. There are lots of little gotchas in either of these 2 solutions. The biggest 2 right away. 1 - picking a delimiter, 2 - dealing with carriage returns in text data. SQL Developer is able to do some extraction, so before you go writing this stuff yourself, I would check it out to see if it does what you are looking for before you reinvent the wheel.

  • Does anyone have a terminal script that can bind Macs to AD?

    Looking to use terminal to bind our Macs to AD. Is there anyone who has done this process before?
    Thanks for the help!

    Personally, we use Casper Suite and that works well especially since it's a 'set and forget' sort of thing.  But I did find this.  I've used some of these commands and this looks thorough. 
    PLEASE BE SURE TO TEST IN YOUR TEST AD ENVIRONMENT!! 
    #!/bin/sh
    ############################ AD_Bind_ARD ###########################
    # Patrick Gallagher | [email protected]
    # http://macadmincorner.com/bind-to-ad-using-apple-remote-desktop/
    # This is a script that will bind a Mac to AD from ARD.
    # Modified from Mike Bombich's ad-bind-login-tiger.sh script
    # which can be found at http://www.bombich.com/mactips/scripts.html
    # Needs to be modified for your enviornment
    computerid=`/usr/sbin/scutil --get LocalHostName`
    # Standard parameters
    domain="domain.school.edu"               # fully qualified DNS name of Active Directory Domain
    udn="username"               # username of a privileged network user
    password="password"                         # password of a privileged network user
    ou="CN=Computers,DC=domain,DC=school,DC=edu"          # Distinguished name of container for the computer
    # Advanced options
    alldomains="enable"               # 'enable' or 'disable' automatic multi-domain authentication
    localhome="enable"               # 'enable' or 'disable' force home directory to local drive
    protocol="smb"                    # 'afp' or 'smb' change how home is mounted from server
    mobile="enable"               # 'enable' or 'disable' mobile account support for offline logon
    mobileconfirm="disable"          # 'enable' or 'disable' warn the user that a mobile acct will be created
    useuncpath="disable"               # 'enable' or 'disable' use AD SMBHome attribute to determine the home dir
    user_shell="/bin/bash"          # e.g., /bin/bash or "none"
    preferred="-nopreferred"     # Use the specified server for all Directory lookups and authentication
    # (e.g. "-nopreferred" or "-preferred ad.server.edu")
    admingroups="YOURDOMAIN\domain admins"     # These comma-separated AD groups may administer the machine (e.g. "" or "APPLE\mac admins")
    # Login hook setting -- specify the path to a login hook that you want to run instead of this script
    ### End of configuration
    # Activate the AD plugin
    defaults write /Library/Preferences/DirectoryService/DirectoryService "Active Directory" "Active"
    plutil -convert xml1 /Library/Preferences/DirectoryService/DirectoryService.plist
    sleep 5
    # Bind to AD
    dsconfigad -f -a $computerid -domain $domain -u $udn -p "$password" -ou "$ou"
    # Configure advanced AD plugin options
    if [ "$admingroups" = "" ]; then
    dsconfigad -nogroups
    else
    dsconfigad -groups "$admingroups"
    fi
    dsconfigad -alldomains $alldomains -localhome $localhome -protocol $protocol \
    -mobile $mobile -mobileconfirm $mobileconfirm -useuncpath $useuncpath \
    -shell $user_shell $preferred
    # Restart DirectoryService (necessary to reload AD plugin activation settings)
    killall DirectoryService
    # Add the AD node to the search path
    if [ "$alldomains" = "enable" ]; then
    csp="/Active Directory/All Domains"
    else
    csp="/Active Directory/$domain"
    fi
    #dscl /Search -create / SearchPolicy CSPSearchPath
    #dscl /Search -append / CSPSearchPath "/Active Directory/All Domains"
    #dscl /Search/Contacts -create / SearchPolicy CSPSearchPath
    #dscl /Search/Contacts -append / CSPSearchPath "/Active Directory/All Domains"
    # This works in a pinch if the above code does not
    defaults write /Library/Preferences/DirectoryService/SearchNodeConfig "Search Node Custom Path Array" -array "/Active Directory/All Domains"
    defaults write /Library/Preferences/DirectoryService/SearchNodeConfig "Search Policy" -int 3
    defaults write /Library/Preferences/DirectoryService/ContactsNodeConfig "Search Node Custom Path Array" -array "/Active Directory/All Domains"
    defaults write /Library/Preferences/DirectoryService/ContactsNodeConfig "Search Policy" -int 3
    plutil -convert xml1 /Library/Preferences/DirectoryService/SearchNodeConfig.plist

  • Script that can choose to play different tracks????

    I'm clueless on how to do this but here is the question...
    How do I write and place a script that will select a certain track when coming from a transition?
    In other words, from the main menu (still menu) if you choose a button it jumps to a transition track. The transition then jumps to the track selected from the menu.
    If the same transition is to be used for every button, is there a script to do this utillizing only one transition track instead of having to have one for every button on the menu?
    Joel

    Most of this is in the manual.
    You have 8 registers/variables to play with, GPRMs, in dvdsp. Dvdsp uses the other 8 for it's coding. You can re-name these 8 GPRMs to what you like eg. Button Value or whatever.
    The DVD player holds values, SPRMs, in memory that can be read (& some wrtten too). SPRM8 holds the current highlighted button value. B1 = 1024, B2 =2048, B3 = 3072 etc.
    Line 1 moves the current value stored in the players memory for SPRM 8 to the register you choose. I chose GPRM 0 but you could choose whatever you want.
    Line 2 divides the value now stored in the register (GPRM 0) by 1024. This will give you easier values for you to play with. 1, 2, 3 etc as oppse to 1024, 2048, 3072 etc.
    Now the following lines just mean Jump to the track if the value stored in the register equals whatever. If this condition is not met then the next line is read. The last line has no 'if' so the script has an out,
    -Jake

  • PS-script that can list all clients in a specific collection and if possible, point out direct members...

    CM2012Sp1Cu1 
    Need a powershell-function that can list all the clients in a specific collection, and then somehow define which of them are direct members. The most important thing for me is to list all the members but it would also be great if I could know which ones are
    direct / query members. 
    Very grateful for all the help I can get!
    TWP

    Here is a very simple example via PowerShell and WMI. It requires your collection id, site code and site server as input. It writes as output the collectionmember plus query, or direct.
    $CollectionId = ""
    $SiteCode = ""
    $SiteServer = ""
    $CollectionMembers = Get-WmiObject -Class SMS_FullCollectionMembership -Namespace root/SMS/site_$($SiteCode) -ComputerName $SiteServer -Filter "CollectionId='$CollectionId'"
    foreach ($Member in $CollectionMembers) {
    if ($Collection.IsDirect -eq "True"){
    $MembershipType = "Direct"
    } else {
    $MembershipType = "Query"
    Write-Host $Member.Name $MembershipType
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude

Maybe you are looking for

  • CS5 for mac air

    i have cs5 on my windows pc but just bought a mac air can this be transferred

  • Contacts lost with sync

    please help. i did a hard reset. now the palm desktop has my contacts and calendar. i'm trying to get them back to my treo by sync-ing. but they won't come back to my handheld! arrgh! does anyone know how to get the contacts back after a hard reset?

  • HT201328 I am looking for a factory unlocked iPhone 5; how do I get one?

    I am looking for factory unlocked iPhone 5; how do I get one? Are all those that are bought online factory unlocked?

  • IIllustrator quits when i try to save any file. please HELP.

    i been working on file for nearly a week now. and i save it intermitently. but as i was tryingto save the final copy it gave a an error: The specified module could not be found. C:\Program Files\Common Files\Adobe\Adobe Version Cue CS4\Client\4.0.0\V

  • JDBC 4.0 and ojdbc14.jar

    Hello everyone i need to know abt jdbc-4.0 api tutorial and abt ojdbc14.jar tutorial which one is better ojdbc or classes12 Thanks