Ponchik
02.08.2006, 17:36
Хай всём! Сколько я искал и в гугле и на форуме чёто о том, как компилировать, мало что нашёл! Даже скачал Borland C Builder 6 но как тама компилировать никто не объяснил! Читал тут на форуме что в линуксе gcc -o file.c file но линукс никогда не ставил, только на скриншотах его видел! Так вот... Например нужно откомпилировать сплоит, щас какой-то найду =) Ну вот этот например http://www.web-hack.ru/exploit/source/MS04-011.c его наверняка все знают! Так вот, мне нужно его откомпилировать, что делать... Ну открываю Borland C Builder тама стандартный какой-то код написан...
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include \"Unit1.h\"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource \"*.dfm\"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
Стираю его, и пишу всё отсюда http://www.web-hack.ru/exploit/source/MS04-011.c дальше нашёл Project --> Compile Unit ну, жму туда! Вот что мне пишет!
Заголовок: Compiling
Project: C:\\путь\\Unit1.cpp
Done: There are errors.
Current line: 0
Total lines: 4219
Hints: 0
Warnings: 0
Errors: 26
И кнопка ОК
Нажимаю ОК
Внизу пишутся ошибки
[C Error] Unit1.cpp(15): E2209 Unable to open include file \'unistd.h\'
[C Error] Unit1.cpp(16): E2209 Unable to open include file \'netdb.h\'
[C Error] Unit1.cpp(18): E2209 Unable to open include file \'sys\\socket.h\'
[C Error] Unit1.cpp(19): E2209 Unable to open include file \'netinet\\in.h\'
[C Error] Unit1.cpp(20): E2209 Unable to open include file \'arpa\\inet.h\'
[C Error] Unit1.cpp(23): E2209 Unable to open include file \'arpa\\nameser.h\'
[C Error] Unit1.cpp(26): E2303 Type name expected
[C Error] Unit1.cpp(144): E2451 Undefined symbol \'packed\'
[C Error] Unit1.cpp(144): E2141 Declaration syntax error
[C Error] Unit1.cpp(152): E2450 Undefined structure \'sockaddr_in\'
[C Error] Unit1.cpp(152): E2449 Size of \'addr\' is unknown or zero
[C Error] Unit1.cpp(152): E2450 Undefined structure \'sockaddr_in\'
[C Error] Unit1.cpp(185): E2450 Undefined structure \'sockaddr_in\'
[C Error] Unit1.cpp(185): E2109 Not an allowed type
[C Error] Unit1.cpp(187): E2315 \'sin_family\' is not a member of \'sockaddr_in\', because the type is not yet defined
[C Error] Unit1.cpp(187): E2451 Undefined symbol \'AF_INET\'
[C Error] Unit1.cpp(188): E2315 \'sin_port\' is not a member of \'sockaddr_in\', because the type is not yet defined
[C Error] Unit1.cpp(188): E2268 Call to undefined function \'htons\'
[C Error] Unit1.cpp(190): E2268 Call to undefined function \'exist_host\'
[C Error] Unit1.cpp(190): E2451 Undefined symbol \'u_long\'
[C Error] Unit1.cpp(190): E2188 Expression syntax
[C Error] Unit1.cpp(202): E2377 If statement missing )
[C Error] Unit1.cpp(203): E2268 Call to undefined function \'connect\'
[C Error] Unit1.cpp(203): E2450 Undefined structure \'sockaddr_in\'
[C Error] Unit1.cpp(203): E2109 Not an allowed type
[C Error] Unit1.cpp(203): E2228 Too many error or warning messages
и выделяется строка #include <unistd.h>
И вот что делать?! Куда кликать-то? :confused:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include \"Unit1.h\"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource \"*.dfm\"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
Стираю его, и пишу всё отсюда http://www.web-hack.ru/exploit/source/MS04-011.c дальше нашёл Project --> Compile Unit ну, жму туда! Вот что мне пишет!
Заголовок: Compiling
Project: C:\\путь\\Unit1.cpp
Done: There are errors.
Current line: 0
Total lines: 4219
Hints: 0
Warnings: 0
Errors: 26
И кнопка ОК
Нажимаю ОК
Внизу пишутся ошибки
[C Error] Unit1.cpp(15): E2209 Unable to open include file \'unistd.h\'
[C Error] Unit1.cpp(16): E2209 Unable to open include file \'netdb.h\'
[C Error] Unit1.cpp(18): E2209 Unable to open include file \'sys\\socket.h\'
[C Error] Unit1.cpp(19): E2209 Unable to open include file \'netinet\\in.h\'
[C Error] Unit1.cpp(20): E2209 Unable to open include file \'arpa\\inet.h\'
[C Error] Unit1.cpp(23): E2209 Unable to open include file \'arpa\\nameser.h\'
[C Error] Unit1.cpp(26): E2303 Type name expected
[C Error] Unit1.cpp(144): E2451 Undefined symbol \'packed\'
[C Error] Unit1.cpp(144): E2141 Declaration syntax error
[C Error] Unit1.cpp(152): E2450 Undefined structure \'sockaddr_in\'
[C Error] Unit1.cpp(152): E2449 Size of \'addr\' is unknown or zero
[C Error] Unit1.cpp(152): E2450 Undefined structure \'sockaddr_in\'
[C Error] Unit1.cpp(185): E2450 Undefined structure \'sockaddr_in\'
[C Error] Unit1.cpp(185): E2109 Not an allowed type
[C Error] Unit1.cpp(187): E2315 \'sin_family\' is not a member of \'sockaddr_in\', because the type is not yet defined
[C Error] Unit1.cpp(187): E2451 Undefined symbol \'AF_INET\'
[C Error] Unit1.cpp(188): E2315 \'sin_port\' is not a member of \'sockaddr_in\', because the type is not yet defined
[C Error] Unit1.cpp(188): E2268 Call to undefined function \'htons\'
[C Error] Unit1.cpp(190): E2268 Call to undefined function \'exist_host\'
[C Error] Unit1.cpp(190): E2451 Undefined symbol \'u_long\'
[C Error] Unit1.cpp(190): E2188 Expression syntax
[C Error] Unit1.cpp(202): E2377 If statement missing )
[C Error] Unit1.cpp(203): E2268 Call to undefined function \'connect\'
[C Error] Unit1.cpp(203): E2450 Undefined structure \'sockaddr_in\'
[C Error] Unit1.cpp(203): E2109 Not an allowed type
[C Error] Unit1.cpp(203): E2228 Too many error or warning messages
и выделяется строка #include <unistd.h>
И вот что делать?! Куда кликать-то? :confused: