scientificlinuxforum.org QR code
Scientific Linux Forum.org



  Reply to this topicStart new topicStart Poll

> binary executable file
joaorobvieira
 Posted: Jun 28 2012, 10:09 AM
Quote Post


SLF Newbie


Group: Members
Posts: 6
Member No.: 1617
Joined: 14-June 12









Anyone knows how to created a binary executable file (i.e. .ELF) with the instruction 'rm -r /home/user1/(file1)' in Linux?
Thnkz
PM
^
Bluejay
 Posted: Jun 28 2012, 11:49 AM
Quote Post


SLF Member
***

Group: Members
Posts: 64
Member No.: 42
Joined: 13-April 11









QUOTE (joaorobvieira @ Jun 28 2012, 05:09 AM)
Anyone knows how to created a binary executable file (i.e. .ELF) with the instruction 'rm -r /home/user1/(file1)' in Linux?

You mean something like:?
CODE
#include <stdlib.h>
int main () {
  return system ("rm -r /home/user1/\\(file1\\)");
}

compile & link:
CODE
cc -o executablefile sourcefile.c
PM
^
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll