Search:

Type: Posts; User: LuckyStr

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,967

    i'm sure, because it is my telnet-server, and i...

    i'm sure, because it is my telnet-server, and i can connect with it through standard telnet-client
  2. Replies
    4
    Views
    1,967

    Telnet-client, get abracadabra from server

    #include <stdio.h>
    #include <sys/socket.h>
    #include <netdb.h>
    #include <stdlib.h>
    #include <string.h>

    #define BUF_LEN 1024
    #define PORT 23

    int main (void)
  3. Replies
    2
    Views
    5,823

    write to and read from /dev/console

    My code, executing by root:


    //file name is "consolka"

    char buf[1024];

    FILE *infile;

    infile=fopen("/dev/console","a");
  4. Replies
    12
    Views
    3,828

    Thank's all, but my mistake was that i check...

    Thank's all, but my mistake was that i check wrong value: if setuid() finished successfully it return 0.


    #include <iostream>
    using namespace std;
    #include <stdlib.h>
    #include <sys/types.h>...
  5. Replies
    12
    Views
    3,828

    [andrew@COR up]$ id uid=501(andrew)...

    [andrew@COR up]$ id
    uid=501(andrew) gid=501(andrew) группы=500(up),501(andrew),502(vboxusers) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
    [andrew@COR up]$ whoami
    andrew...
  6. Replies
    12
    Views
    3,828

    no, if i run by root or by user with uid=501 i...

    no, if i run by root or by user with uid=501 i get nothing.
    by root:

    [root@COR Release]# ./ssetu
    started as uid=0, pid=9571
    fork()=9572
    parent uid=0
    parent pid=9571
    fork()=0
    child print...
  7. Replies
    12
    Views
    3,828

    Excuse for unreadable. [andrew@COR...

    Excuse for unreadable.




    [andrew@COR disk]$ ls -l
    -rwxrwxrwx. 1 root root 6 Авг 23 18:37 log
    I know that > will delete any previous contents of the file.
    Before:
  8. Replies
    12
    Views
    3,828

    Execute shell command from other user

    I want to execute shell command by user with uid 501. I run this application by root. I wrote:


    #include <iostream>
    using namespace std;
    #include <stdlib.h>
    #include <sys/types.h>
    #include...
Results 1 to 8 of 8