Jump to content

datajumper

Active Members
  • Posts

    165
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by datajumper

  1. ok guys i have another noob question maybe someone can help. i have the wifi pineapple mark 5 and i was wondering if im doing something wrong or

    if there is something wrong with this particular infusion im trying to get SSL split up and going but the security certificate page in all browsers pops up and

    pretty much warns the victim that they are being hacked ....LOL.... or it just simply does not allow the client to acsess the web at all until the pine apple

    has been rebooted i know im probabaly a dumbass and its probabaly something really simple so please be kind i hope someone can help with this

    and as always special thanx to everyone in advanced

    post-48635-0-15404900-1413707670_thumb.p

  2. The system() function starts a process that you won't have anything to do with at all ever again. All it returns to you is the PID of the newly created program, which means the only thing you can do at this point is send it a signal. You have *ZERO* control.

    Since you want to capture the process' output and provide it with input, you need to communicate with this process you're going to start. To do this you first create 2 or 3 pipes (using the pipe() function) - one will be STDIN for the command to be invoked and the other STDOUT (the optional 3rd one for STDERR). Next, using the fork() function, you create a new process for your program. The main process will get the new process' PID as return value for fork(), the newly created process will get 0 which is how you can tell them apart within the code of your program.

    On the newly created process' side, you tie the appropriate ends of the pipes to the STDIN, STDOUT and possibly STDERR file descriptors of your process using the dup2() function. Next you start the command that is supposed to be run using the execve() function, which effectively replaces your client program logic with that of the command you're running - but all your setup work with preparing STDIN/STDOUT/STDERR will remain in place.

    On the main process' side, you start reading from the STDIN pipe, waiting for the data that you're expecting and when you see it you write to the STDOUT pipe the data that you were supposed to send to the process.

    Here's an online example of just this.

    thank you so much ill give that a try :: thanx for all your help maybe im on the right path now lol

  3. hello im kinda new to c++ i probabaly dont even have a good reason on why im wanting to do this

    but here goes im trying to learn c++ and the only way i can learn is to build something im interested in

    a while back i made this wonderful bash script that installs everything i need on a fresh install of ubuntu

    (example #!/usr/bin/expect -f spawn sudo -s expect "password" send "pswd" expect "s" send "apt-get install "whatever ")

    get the concept ? ok now i want to do the same thing "kinda" but in c or c++ i

    i know a little about the system command which i have confirmed it works and works well

    but i dont know how to send multiple commands to the terminal like using send totype commands and passwords like in expect

    so i would appriciate any criticism and if you have any knowledge about this or simular i would be very greatful if you could shed

    some light on the subject thanx

×
×
  • Create New...