automatiser un exe console avec visual c++ : pb de gestion de l'exe
Répondre à la discussion
Affichage des résultats 1 à 3 sur 3

automatiser un exe console avec visual c++ : pb de gestion de l'exe



  1. #1
    invite35c1f9c5

    automatiser un exe console avec visual c++ : pb de gestion de l'exe


    ------

    bonjour,

    je veux automatiser un executable console (openssl pour info) en remplçant les invites de commandes par un beau formulaire fait avec visual c++ .net.

    j'arrive a lancer mes requetes openssl avec la commande systeme("openssl ... < tmp.txt");, le .txt etant genéré en fonction du formulaire. ça repond bien aux demandes d'openssl sauf pour les champs de type mot de passe, où ça donne la main, mais ça ne fait rien...

    je veux donc à cet instant simuler des frappes claviers avec la fonction keybd_event(...). Seulement, la fonction system() "interrompt" l'execution de mon code et ne reprend qu'a la fin de la commande openssl... donc je ne peux pas simuler mes frappes clavier qd il faut.

    existe t il une fonction qui me permet de lancer mes commandes openssl et de pouvoir effectuer mes frappes clavieres qd il faut ?


    merci

    -----

  2. #2
    inviteb865367f

    Re : automatiser un exe console avec visual c++ : pb de gestion de l'exe

    Ca a l'air pas simple ce que tu veux faire... mais un fork avant system ca ne marcherait pas ?

  3. #3
    invite504c296f

    Re : automatiser un exe console avec visual c++ : pb de gestion de l'exe

    Salut,
    jamais utilisé OpenSSL mais en regardant la page de man il s'avère qu'e tu peux envoyer le password en argument :
    extrait:
    PASS PHRASE ARGUMENTS
    Several commands accept password arguments, typically using -passin and -passout for input and output passwords respectively.
    These allow the password to be obtained from a variety of sources. Both of these options take a single argument whose format is
    described below. If no password argument is given and a password is required then the user is prompted to enter one: this will
    typically be read from the current terminal with echoing turned off.

    passassword
    the actual password is password. Since the password is visible to utilities (like 'ps' under Unix) this form should
    only be used where security is not important.

    env:var obtain the password from the environment variable var. Since the environment of other processes is visible on certain
    platforms (e.g. ps under certain Unix OSes) this option should be used with caution.

    fileathname
    the first line of pathname is the password. If the same pathname argument is supplied to -passin and -passout arguments
    then the first line will be used for the input password and the next line for the output password. pathname need not
    refer to a regular file: it could for example refer to a device or named pipe.

    fd:number read the password from the file descriptor number. This can be used to send the data via a pipe for example.

    stdin read the password from standard input.

Discussions similaires

  1. Brancher sa console sur son PC pour jouer avec l'écran
    Par invite24e01830 dans le forum Logiciel - Software - Open Source
    Réponses: 13
    Dernier message: 09/10/2008, 19h38
  2. Ascenseur en Visual basic avec K8055
    Par invite7a1a445f dans le forum Électronique
    Réponses: 0
    Dernier message: 10/05/2006, 21h43
  3. lancer un exécutable avec visual basic
    Par invite4992f85f dans le forum Logiciel - Software - Open Source
    Réponses: 10
    Dernier message: 16/02/2006, 12h16
  4. Débuter avec Visual Basic
    Par invite56460777 dans le forum Logiciel - Software - Open Source
    Réponses: 3
    Dernier message: 18/12/2004, 18h41
  5. Problème avec visual basic
    Par KHEOPS1982 dans le forum Logiciel - Software - Open Source
    Réponses: 5
    Dernier message: 14/08/2004, 00h11
Découvrez nos comparatifs produits sur l'informatique et les technologies.