Questions tagged [execve]
207 questions
0
votes
1 answer
execve error: no such file or directory
I'm trying to write a program to execute and schedule a list of processes. My code for main.c is below. When run, I receive an error from perror saying there is no such file or directory. I'm guessing this is because the files/programs in my…

user3192682
- 123
- 1
- 2
- 11
0
votes
1 answer
assembly x86: execve with multiple args
I want to write a shellcode that execute a sys_execve("/usr/bin/scp","usr/bin/scp",args,NULL).
This is the full command:
scp -i /tmp/file -P 8989 /path/file user@ip:/home/user
The problem is that i need a lot of register (there are 6 tokens after…

polslinux
- 1,739
- 9
- 34
- 73
0
votes
0 answers
Cannot change the file property on ios 7 jailbreak iphone
my device is iphone 5s with ios 7, it is jailbreak.
I failed to change the file property using the follow code on jailbreak ios 7, but it will be successfuleif ios version is less than 7, my code is
int main(int argc, char *argv[])
{
…

user738417
- 1
- 2
0
votes
1 answer
execve won't run executable assembly file
I'm trying to create a c program that takes an executable and its arguments and runs them using execve, and then does some other stuff that shouldn't matter. The problem I'm having is that execve won't work when calling it on an exectuable assembly…

zaloo
- 879
- 3
- 13
- 27
0
votes
1 answer
execve of /usr/bin/xfce4-terminal gives "Session manager variable not defined"
I'm trying to have a process fork and run execve in the child process so that it will open a new terminal window and execute a custom command there.
The program I want to execute is gestore
These are the arguments I pass to execve:
char *…

sowdust
- 87
- 1
- 9
0
votes
3 answers
SIGCHLD not being caught
I intend the following code to fork and exec "sleep 3" as a child while the parent process sleeps for 10s. I expect the parent process to receive SIGCHLD after 3s, when the "sleep 3" sompletes.
This does not happen, instead I get:
main
parent…

fadedbee
- 42,671
- 44
- 178
- 308
0
votes
1 answer
execve and pipe issues - how to read last output?
I am trying to execute following command and reads it's output.
/usr/sbin/system_profiler SPHardwareDataType | grep 'Serial Number'
I have to use execve directly (no popen). I believe I'm failing at last step, reading output from second child into…

fritz
- 111
- 1
- 11
0
votes
1 answer
How to get data from read program to main program using execve and pipe?
I am doing a project in that I have to create a child process by using fork and then parent process tells to child process to execute another C program "read.c"(which reads all integers from a .txt file and compute average) by using execve then I…

TusharU
- 1
- 3
0
votes
1 answer
Environment variables using execve() to run child process
I am using a parent process that uses execve() to run a child process with specific environment variables that I have defined in the parent process.
In the parent process if I look at the memory location $esp + 0x240 I find all the environment…

Benjamin R C Bell
- 1
- 1
- 5
0
votes
1 answer
Stack memory addresses in Shellcode
I was reading a basic article on writing a shellcode (execve using stack method) here: http://hackoftheday.securitytube.net/2013/04/demystifying-execve-shellcode-stack.html
In step 6: It pushes a null character because the string "/bin/sh" is null…

user720694
- 2,035
- 6
- 35
- 57
0
votes
1 answer
Why doesn't strace show HDD IOCTL syscalls?
When doing an strace -ttT date I miss a lot of syscalls right after the lauch of the executable. After the execve() there are no further syscalls where the date ELF is copied from HDD to memory, does this happen within the kernel? I thought I'd see…

JohnnyFromBF
- 9,873
- 10
- 45
- 59
0
votes
1 answer
How do you convert a string to a char[]* in C++ execve command?
When trying to use the execve command, I receive an error about my last 2 arguments.
#include
const char * c = enviorment.c_str();
execve(full.c_str() , cl.getArgVector(), c);
I've tried using the several…

user1797035
- 128
- 7
0
votes
3 answers
Network Programming in C with execve system calls
I am trying to create a simple client/server program that allows the client to connect to the server using a TCP socket and then allows the user to issue system calls form the client side to the server side and return the reply to the user. For…

Matt Hintzke
- 7,744
- 16
- 55
- 113
0
votes
1 answer
Using "execve" to run the process of android emulator in Linux, but the "avd" path is wrong?
I meet a question about running android emulator, here is the details below. Thanks a lot!
I need to run android emulator automatically, so tend to use execve in Linux, the source code shown below:
/*initailize passed command line\*/
char *binary…

corey
- 1
-1
votes
1 answer
recreating pipe in C issue about execution
I'm actually working on project and we're trying to recreate a bash terminal in C. I've got some problems about handling pipes in my code. As you know when you write "cat | ls", it first shows ls result then standard input is opened but only for one…

ethaaalpha
- 1
- 2