I want to execute metasploit by two pipes to communicate with it, but I have troubles with that communication. When I run my program, I get this error: "stty: standard input: Inappropriate ioctl for device" and I don't receive the metasploit promt.
just select an exploit.
This is my code:
I'm very worried. I have an assignment that is due in 3 weeks, and also tute exercises which I can't seem to understand and work out.
Okay, the question:
The parent process will convert the command arguments into integer values using atoi() and store them into an integer array which you will... (2 Replies)
I'm having difficulty understanding the purposes of using dup/dup2 when involving forks.
for example, if we call fork() once, that is, we are creating a child process. In what cases would we need to use dup or dup2 to duplicate the file descriptors for standard output and standard error? What... (1 Reply)
Hi,
i have in one program such a pice of code
................
static int old_stderr_handle = -1;
static int old_stdout_handle = -1;
log_handle = open(log_file_name,O_CREAT|O_RDWR,932);
old_stderr_handle = dup(STDERR_FILENO);
if (dup2(log_handle,STDERR_FILENO) < 0)
{
//... (1 Reply)
int redirect()
{
int fd,rc;
fd = open("sample.DAT",O_CREAT | O_RDWR , 00777 );
rc = dup2(fd , 1 ) ;
close (fd );
return 0;
}
I used the above to redirect all the cout statements to sample.DAT. process is redirecting the output and I had two questions
1. All stdout/cout statements... (2 Replies)
Hi all,I'm reading <Advanced programming in the UNIX environment>,that book asked the reader to implement a function which has same functions with dup2 without calling fcntl.Could anyone give me a tip?Any help will be appreciated.:) (8 Replies)
Hello, I'm stuck and this is a matter which I need to resolve quite fast (but I couldn't post in the "Emergency" section); the problem is this :
I have created a chat program in which the client sends the sentence to the server and then the server should send it to all the clients connected,... (2 Replies)
Hi, I will try to keep my post as compressed as my title was.
I am writing on pseudo code on a recursive function that I want to read from the one-above function-run and then give the result to the function-run down below until a stop is triggered. Example:
$ ls -la | grep x | sort
In my... (2 Replies)
is it possible to duplicate file descriptors(opened by a different process) with the help of dup or dup2. the two process do not share parent child relationship as well. (2 Replies)
What this code should do is: there are parent.cpp and child.cpp. Parent will send whatever is in the buffer to child and child will send back whatever received to parent. I do not know what I am doing wrong. I am confused what is missing in the parent and what else I should include into the child.... (1 Reply)
Discussion started by: ramono
1 Replies
LEARN ABOUT REDHAT
x3270if
X3270IF(1) General Commands Manual X3270IF(1)NAME
x3270if - command interface to x3270, c3270 and s3270
SYNOPSIS
x3270if [ -v ] action [ ( param [ ,... ] ) ]
x3270if [ -v ] -s field
x3270if -i
DESCRIPTION
x3270if provides an interface between scripts and the 3270 emulators x3270, c3270, and s3270.
x3270if performs one of three functions. In action mode (the default), it passes a single action and optional parameters to the emulator
for execution; the result of the command is written to standard output. In status mode, it reports to standard output the value of one of
the emulator's status fields. In iterative mode, it forms a continuous conduit between a script and the emulator.
OPTIONS -v Turns on verbose debug messages, showing the literal data that is passed between the emulator and x3270if.
-s field
Puts x3270if in status mode: it outputs the value of an emulator status field. Field is an integer in the range 0 through 11. The
value 0 is a no-op and is used only to return exit status indicating the state of the emulator. The indices 1-11 and meanings of
each field are documented on the x3270-script(1) manual page.
-i Puts x3270if in iterative mode. Data from x3270if's standard input is copied to the emulator's script input; data from the emula-
tor's script output is copied to x3270if's standard output. x3270if runs until it detects end-of-file on its standard input or on
the output from the emulator. (This mode exists primarily to give expect(1) a process to run, on systems which do not support bidi-
rectional pipes.)
EXIT STATUS
In action mode, if the requested action succeeds, x3270if exits with status 0. If the action fails, x3270if exits with status 1. In iter-
ative mode, x3270if exits with status 0 when it encounters end-of-file. If there is an operational error within x3270if itself, such as a
command-line syntax error, missing environment variable, or an unexpectedly closed pipe, x3270if exits with status 2.
ENVIRONMENT
x3270, c3270, and s3270 use a pair of pipes for communication with each child process. The values of the file descriptors for these pipes
are encoded as text in two environment variables, which are required by x3270if:
X3270OUTPUT
Output from the emulator, input to the child process.
X3270INPUT
Input to the emulator, output from the child process.
SEE ALSO x3270(1), c3270(1), s3270(1), x3270-script(1)COPYRIGHT
Copyright 1999, 2000 by Paul Mattes.
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby
granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission
notice appear in supporting documentation.
01 May 2002 X3270IF(1)