Execute and pass parameter to external program

hi all,
i need to wrap a program using java.
i would like to write a java program able to ask for user input as soon as wrapped command ask for.
from the user point of view the behaviour should be the same.
example
program to be wrapped: mycommand.exe
mycommand synopsis
mycommand file1: mycommand ask for a string and writing it in file file1
i would like to execute mycommand file1
in a java program getting the orginal behaviour.
so...
String command = "mycommand file1";
Process process = Runtime.getRuntime().exec(command);
// from now on somebody can help me?
thank you
Luca

lrasco wrote:
i would like to write a brute force password cracker (for my own use, i forgot a password).
rar ask user for password, if ok exit 0 otherwise exit 1 (i suppose).
my program execute rar, which sholud ask for password, pass a password, check for exit code, then exit or continue.That tells us what you're trying to accomplish, not what problems you're having.
For the record, I'm extremely skeptical of your claim that this is for the legitimate use of recovering your own password. The proper approach would be to contact the admin to reset it.
Of course, trying to brute force crack a password by executing an interactive program like this will be extremely slow anyway. Assume a 6 letter password over the 62-character space of uppercase, lowercase, and digits. There are 62^6 = 56,800,235,584 possible passwords. On average, you'll have to search through half of them, which is 28,400,117,792. If you can do 100 / sec., then that will take 28400117792 / 100 / (60 x 60 x 24 x 365) = 9 years.
EDIT: Stupid math operator markup.
Edited by: jverd on Jan 13, 2010 11:20 AM
EDIT: fixed math error
Edited by: jverd on Jan 13, 2010 11:21 AM

Similar Messages

  • Passing parametes to external program

    What is the command to pass parameters to an external progarm from Java interface? I mean how should the exec() command be modified in order to pass paremeters to the external program..
    Thanks...

    Look at the documentation for the Runtime and ProcessBuilder classes here, there is a variety of ways to pass parameters.
    http://java.sun.com/j2se/1.5.0/docs/api/index.html

  • Looking for a way to pass parameter to external list from infopath

    Hey, i have a Sharepoint 2010 list for which I want to create Infopath form. I have an external content type and external list based on it.
    I want to prepopulate some fields in my Sharepoint list with data from external list. I tried to use external list as a secondary data source and query it for needed values. The issue I encounter is that my ECT has a finder with filter and I can't figure
    out how to pass a value to this filter within infopath.
    How can it be done with infopath? How can I pass the filter value to the external list using Infopath?

    Hi,
    According to your post, my understanding is that you wanted to pass parameter to external list from infopath.
    You need to query the external list from InfoPath using coding and CAML Query.
    Here is a similar thread for your reference:
    http://sharepoint.stackexchange.com/questions/33575/filtering-sharepoint-external-list-bcs-from-infopath
    Thanks,
    Linda Li
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

  • Create an API to Launch an LabVIEW Built Executable and Pass it Input Parameters

    Hello,
    I'm looking for a way to create an API to Launch/Close an executable, created with LabVIEW, which in additional to Launching/Closing tht executable, will also allow me to pass input parameters.
    To give you some background, I'm working on a logging utility, basically a background dameon, which I currently have implemented as a LabVIEW packed library and my API is a few VIs to launch that daemon and pass it a filename and a logging rate.  Functionally it works just fine however is executes within LabVIEW not as an independent process.  So instead of using a packed library, I would like to compile my logging daemon down to an executable but I still need a way to launch it and pass it parameters from an external application (such as Teststand).
    I know you can launch executables and pass parameters using windows command lines, but I'm wondering if there is a more direct method such as a DLL that I could call in Teststand?  Thanks.
    Post CLD and when I'm a CLA when someone asks who I am, I can spin around in my chair and say "I am... the architect."

    When Teststand Launches the Logger, it does so by opening a reference to the logger daemon using the "Open VI Reference" primitive and then it launches an instance of the dameon using the "Start Asynchronous Call" node.
    This currently, launches the logger within labview not teststand.  If I were to directly call the logger daemon VI itself as a step in TestStand, then it could run in a new teststand thread.  At that point I would need a way to stop that logger which I should be able to do by storing a reference to its control queue within the teststand thread that it is running in.  Since teststand let's you specify VI execution in the runtime engine instead of LabVIEW that might do the job.
    The one catch is once the sequence completes, the logger does some cleanup, post processing, etc that depending on the amount of data captured can take some time so if a set of sequences needs to be executed, this could hang up teststand until that post processing is completed.  That is one reason why I wanted it to execute outside of testtand so that additonal sequences could continue to run while the daemon finishes up in the background.
    But, it's something I'll have to look into.
    Post CLD and when I'm a CLA when someone asks who I am, I can spin around in my chair and say "I am... the architect."

  • System exec, How I say to open one file and make operation in external program?

    Hi,
    I got called an external program with the system exec.vi, but i would like the program open the file saved in the other window, i can get the file path, but how Can I put the file path in the external program and the program open the file and I tell (in this case compile), since i open one file code c and only i must to open and say to the program 'compile' and then close external program.
    Any help?. Thanks.
    Attachments:
    system_exec.GIF ‏8 KB

    Hi Fonsi,
    System Exec.vi will allow you to run commands like launching a program easily but it is difficult and many times not possible to execute commands within an application.
    A better way maybe to approach this though ActiveX. Please look at the following example that uses ActiveX to communicate with Excel.
    Writing Rows to Excel 97 and Excel 2000 Using ActiveX
    If you are not familiar to ActiveX and LabVIEW, please read the document below:
    ActiveX and LabVIEW
    I hope this
    helps.
    Sincerely,
    Feroz
    National Instruments

  • Execute a command in an external program.

    Hi all,
    I have a little question. I want to execute a command (ctrl+F1) in an external program. This program is already open, so i dont need to execute it. Is there a way to get the focus in this program and automaticly execute my command? I have checked around and all i found was how to execute the program.
    Thanks alot
    Alex

    I want to execute a command (ctrl+F1)Thats a key stroke, not a command.
    in an external program.I always ask this, but what is an internal program?
    Is there a way to get the focus in this program and automaticly execute my command?Kind of. java.awt.Robot provides methods to simulate mouse and keyboard events. If you know where the window is on the screen, you could focus it using the Robot (move the mouse over it and click) and then issue a key event.
    Not too easy.

  • How toStore the Date Variable and pass it when the program runs next time??

    HI All,
    My JDBC program basically needs two command line args. Rabge_Start_Dt and Range_End_Dt. for ex:
    2001-05-31 and 2001-06-01 . And my porgram should run every day. Next day the date range will be 2001-06-01 to some date. It means I have to store some how the range_end_dt and pass it as range_start_dt when my program runs the next day.
    Problem:
    How can I store the Data variable and pass it as an argument to my porgram when It runs next time. Every time my pogram runs It should pick the range start_dt (==range_end_dt of the previuos run) and end_dt I have to go and query some other data base and pass that value to it.
    Thanks in advance!!!!

    save the value in a file, then read it back in each day. Similar to when a process needs a PID.
    -blhqctz

  • How to call form and pass parameter from OA Page

    Hi,
    I have one requirement to call a custom form from OA page by clicking the button and the same time i need to pass one parameter from this
    oa page to that form.
    how to do this by personalization?
    i surfed lot and i got some idea, some one said "pass the value as global variable and receive the global parameter when the new form instance trigger" .
    Can anyone please give about about this ?
    Thanks in advance,
    SAN

    This seems to be related to EBS and since this forum is dedicated to Fusion you might want to post the question to E-Business Suite forums and
    Support forum for EBS customizations.
    Jani Rautiainen
    Fusion Applications Developer Relations
    https://blogs.oracle.com/fadevrel/

  • How to call PL/SQL function and pass parameter to ODI variable?

    Can I call PL/SQL function and assign a return value to an ODI variable? Also can I assign ODI variable to IN paramter and assign OUT parameter to ODI variable? What ODI doc has that information?
    Thanks

    Hi,
    Refer this http://odiexperts.com/how-to-use-plsql-procedures-and-functions-in-odi
    Thanks,
    Sutirtha

  • GoLinks and passing parameters to external sites

    I am trying to have a goImageLink (or goLink or goButton) that takes the user to another site. The destination url is expecting parameters.
    Example: http://www.abc.com?param1=xyz&param2=wxy
    I've seen a few examples of something similar to this, and I am just wondering why there isn't any other way to do it? Am I required to manually build the URL in a managed/backing bean?

    JRolls,
    there is not mandatory to use a managed bean, you can use the EL to build parameter but you must have the values!
    where are the values for the parameter??
    <af:goLink destination="http://www.abc.com?param1=#{EL...}&param2=#{EL...}"/>
    use EL to refer to managed bean or a value from bindings already available in your page.
    I hope to get your mean correctly.

  • Retrieving and Sending data from external programs

    I am currently looking at a project but do not know how to start tackling the problem.
    I have a couple of similar programs written in different languages (not JAVA) that I do not have access to the source code.
    I need to enter data into fields in a new JSP page and paste the same data into their corresponding fields in the programs that I do not have access to their source codes.
    I considered using coordinates but it may have major maintainence problems in the future.
    Any help will be much appreciated.

    hi,
    Did you try java native methods. I think this might help you if not I am sorri
    shyam

  • Open popup window and passing parameter to the popup

    Hi, I want to open a popup whenever a button is pressed (the page number is 10)
    my first attempt was to make a process which have a button condition (after submit)
    BEGIN
    htp.p('<script type="javascript/text">');
    htp.p('javascript:popupURL(
    "f?p=&APP_ID:12:&APP_SESSION.::NO::P12_PERSON::PERSON_ID")');
    htp.p('</script>');
    END;
    I want to pass the value
    from
    page 10 item :PERSON_ID (initial page)
    to
    page 12 item :P12_PERSON (this is the popup page)
    I also made a branch for the button which redirect to page 10, since no button can be left without any branch or redirect.
    the problem is, I dont see any popup was opened. Is there something wrong on my syntax?
    thanks for your attention, I appreciate any suggestion
    danny

    Thanks many many thanks for your help Varad, I'm still having problem with the JS though
    About the popupname I found another function on apex js documentation, the function name is popUpNamed(url,name). Now I don't have any problem with the date picker anymore.
    My JS look like this now
    <script type = "text/javascript">
    function buildURL()
    var pg = $x('P10_SHOWROLLELIST').value;
    var prsn_id = 'P'+ pg + '_PERSON';
    popUpNamed('f?p=&APP_ID.:' + pg + ':&APP_SESSION.::NO::' + prsn_id + ':&PERSON_ID.', 'Rolle' );
    </script>
    but still it seems like this line" var pg = $x('P10_SHOWROLLELIST').value;" still produce an error on my side. I tried to change pg into a fix value for eg: '12' and it works.
    P10_SHOWROLLELIST is a select list which return a value
    this is the query of the select list
    SELECT 'Mitarbeiter' AS D, '12' as R
    FROM persrollemitarbeiter
    WHERE person = :PERSON_ID
    UNION ALL
    SELECT 'Student' AS D, '13' as R
    FROM persrollestudent
    WHERE person = :PERSON_ID
    UNION ALL
    SELECT 'Mentor' AS D, '14' as R
    FROM persrollementor     
    WHERE person = :PERSON_ID
    UNION ALL
    SELECT 'Korrektor' AS D, '15' as R
    FROM persrollekorrektor
    WHERE person = :PERSON_ID
    UNION ALL
    SELECT 'Tutor' AS D, '16' as R
    FROM persrolletutor
    WHERE person = :PERSON_ID
    danny
    Edited by: user8241814 on 26.06.2009 07:56

  • Column sort and pass parameter

    Hi,
    Is it possible, in tabular form, using the "sort" option to add a parameter to the column title link?
    Thanks,
    Paulo

    Hi,
    In the fieldcatalog of the field set these value.
    fieldcate-no_out = 'X'.
    fieldcate-tech = 'X'
    Cheers,
    Vasanth

  • Error while pass parameter to procedure....

    We have developed procedure with parameter ORG_ID (Number) then create executable and define program. When we execute this executable and pass ORG parameter, we get following error, pl help in this regard:
    Data type of parameter and column is same
    Cause: FDPSTP failed due to ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'COST_ELEMENT_UPDATION_CUST'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored

    procedure works in pl/sql developer but when we define as "PL/SQL Stored Procedure" in application it prompt error.
    CREATE OR REPLACE PROCEDURE Cost_Element_Updation_Cust(P_ORG IN number) IS
    --P_ORG NUMBER(10) := 91;
    BEGIN
    --FOR 1PP ORG, for average costing header line
    INSERT INTO CST_ITEM_COSTS
    SELECT M.INVENTORY_ITEM_ID,
    M.ORGANIZATION_ID,
    C.COST_TYPE_ID,
    SYSDATE,
    C.LAST_UPDATED_BY,
    SYSDATE,
    C.CREATED_BY,
    C.LAST_UPDATE_LOGIN,
    C.INVENTORY_ASSET_FLAG,
    C.LOT_SIZE,
    C.BASED_ON_ROLLUP_FLAG,
    C.SHRINKAGE_RATE,
    C.DEFAULTED_FLAG,
    C.COST_UPDATE_ID,
    C.PL_MATERIAL,
    C.PL_MATERIAL_OVERHEAD,
    C.PL_RESOURCE,
    C.PL_OUTSIDE_PROCESSING,
    C.PL_OVERHEAD,
    C.TL_MATERIAL,
    C.TL_MATERIAL_OVERHEAD,
    C.TL_RESOURCE,
    C.TL_OUTSIDE_PROCESSING,
    C.TL_OVERHEAD,
    C.MATERIAL_COST,
    C.MATERIAL_OVERHEAD_COST,
    C.RESOURCE_COST,
    C.OUTSIDE_PROCESSING_COST,
    C.OVERHEAD_COST,
    C.PL_ITEM_COST,
    C.TL_ITEM_COST,
    C.ITEM_COST,
    C.UNBURDENED_COST,
    C.BURDEN_COST,
    C.ATTRIBUTE_CATEGORY,
    C.ATTRIBUTE1,
    C.ATTRIBUTE2,
    C.ATTRIBUTE3,
    C.ATTRIBUTE4,
    C.ATTRIBUTE5,
    C.ATTRIBUTE6,
    C.ATTRIBUTE7,
    C.ATTRIBUTE8,
    C.ATTRIBUTE9,
    C.ATTRIBUTE10,
    C.ATTRIBUTE11,
    C.ATTRIBUTE12,
    C.ATTRIBUTE13,
    C.ATTRIBUTE14,
    C.ATTRIBUTE15,
    C.REQUEST_ID,
    C.PROGRAM_APPLICATION_ID,
    C.PROGRAM_ID,
    C.PROGRAM_UPDATE_DATE,
    C.ROLLUP_ID,
    C.ASSIGNMENT_SET_ID
    FROM APPS.CST_ITEM_COSTS C, APPS.MTL_SYSTEM_ITEMS_B M
    WHERE C.INVENTORY_ITEM_ID =
    (SELECT ITEM_ID FROM IFL.COST_ELEMENT_CUST WHERE ORG_ID = P_ORG) AND
    C.ORGANIZATION_ID = P_ORG AND C.COST_TYPE_ID = 1002 AND
    M.SEGMENT3 = 'IMPORTED' AND
    M.SEGMENT1 IN ('F ASSET', 'SPARES', 'TOOLS', 'STORES') AND
    M.ORGANIZATION_ID = P_ORG
    --AND M.INVENTORY_ITEM_ID=154540
    --Get item from cost which are pending for costing
    AND M.INVENTORY_ITEM_ID NOT IN
    (SELECT DISTINCT INVENTORY_ITEM_ID
    FROM apps.CST_ITEM_COST_DETAILS_V
    WHERE COST_TYPE_ID = 1002 AND ORGANIZATION_ID = P_ORG);
    COMMIT;
    END Cost_Element_Updation_Cust;

  • Selected Lov Value as Parameter to Concurrent Program in oaf

    Hi,
    iam new to OAF ,Can any one please help me how to pass selected lov value as a parameter to the Concurrent program in oaf.
    i created one lov in oaf page after selecting value in lov i want that value to be passed as parameter to concurrent program.
    Please help me how to implemet code so that Lov will pass as parameter to the concurent program in Controller.

    Check these links. You need to get the value from the LOV to a variable, add it to the vector and pass to the conc program. Below link provides the details on concurrent program submission.
    http://prasanna-adf.blogspot.com/2008/11/call-concurrent-program-from-oa.html
    For fetching LOV values, check the Dev Guide
    Thanks
    Shree

Maybe you are looking for

  • ICal update And creation of a third calendar that I am now locked into

    I had both a work & home calendar set up and sync'ed via M-ME. All seemed to work fine. Now, they are not syncing properly and are behaving in ways I have never seen before. - Push syncing is no longer working. I have tried resetting the sync data wi

  • Link to open up in the same tab

    Hello all, and Merry Christmas! OK so I have a Flash file in my website that contains a link to another page on the site. However at the moment when I click it, the new link opens up in a new tab, rather than the same tab which I would like to happen

  • Recording more than 2 tracks?

    I bought Logic Express 8 and an M-Audio Fast Track Ultra interface to record keyboard, vocal and guitar. The Fast Track Ultra is a 4 channel USB interface. I just tried to record the keyboard in stereo, and a vocal track at the same time. The problem

  • Not starting up after installation of Security Update 2008-002

    Hi there, After successfully downloading and installing the Sec. Upd 2008-002 and proceeding to a 'restart' as required, my mac no longer starts up. I get the chime but the 'wheel'keeps spinning without further action. Any help on this ? Thanks Eric

  • Streaming video keep buffering after enabling SSL connection

    Hi, I am running Adobe Connect Pro 7 /w SP2. I started having this video streaming problem (buffering on the status bar) in my presentations after I enabled the SSL connection on the server. I tried different video format and it didn't seem to make a