Странно. Я думаю у тебя изменены локальные файлы.
Code: Select all
yacc glcpp/glcpp-parse.y
Code: Select all
yacc glcpp/glcpp-parse.y
Code: Select all
D:\kolibri\contrib
At revision: 5176
Code: Select all
__DEBUG__ = 1
__DEBUG_LEVEL__ = 1
format coff
use32 ; Tell compiler to use 32 bit instructions
include 'struct.inc'
include 'proc32.inc'
include 'macros.inc'
purge section,mov,add,sub
include 'debug-fdo.inc'
include 'network.inc'
include 'http.inc'
include 'dll.inc'
public init_network as '_init_network'
public dll.Load as '_dll_load'
section '.flat' code
proc init_network
mcall 68,11
stdcall dll.Load, @IMPORT
;; stdcall new_dll_load, @IMPORT
test eax, eax
jnz error
mov eax, 0xAABBCCDD
mcall -1
error:
mov eax, 0xEEFF8899
mcall -1
endp
@IMPORT:
library lib_http, 'http.obj'
import lib_http, \
HTTP_get, 'get', \
HTTP_post, 'post', \
HTTP_receive, 'receive', \
HTTP_find_header_field, 'find_header_field', \
HTTP_free, 'free', \
HTTP_escape, 'escape'
Code: Select all
extern void init_network(void);
int main()
{
__asm__ volatile("int3"::);
init_network();
__asm__ volatile("int3"::);
return 0;
}
Code: Select all
__DEBUG__ = 1
__DEBUG_LEVEL__ = 1
format coff
use32 ; Tell compiler to use 32 bit instructions
include 'struct.inc'
include 'proc32.inc'
include 'macros.inc'
purge section,mov,add,sub
include 'debug-fdo.inc'
include 'network.inc'
include 'http.inc'
include 'dll.inc'
virtual at 0
http_msg http_msg
end virtual
public init_network as '_init_network'
public open_site as '_open_site'
public dll.Load as '_dll_load'
public dll.Link as '_dll_link'
public dll.Init as '_dll_init'
public mem.Alloc as '_mem_alloc'
public mem.ReAlloc as '_mem_realloc'
section '.flat' code
proc init_network
mcall 68,11
stdcall dll.Load, @IMPORT
;; stdcall new_dll_load, @IMPORT
test eax, eax
jnz error
mov eax, 0xAABBCCDD
ret
error:
mov eax, 0xEEFF8899
mcall -1
endp
proc open_site
mov eax, identifier
invoke HTTP_get, sz_url, 0, 0, 0
test eax, eax
jz error2
mov [identifier], eax
.again:
invoke HTTP_receive, [identifier]
test eax, eax
jnz .again
mov eax, [identifier]
add eax, 32
mov ebx, [eax]
int3
DEBUGF 1, "The content is : %s", ebx
ret
error2:
mcall -1
endp
@IMPORT:
library lib_http, 'http.obj'
import lib_http, \
HTTP_get, 'get', \
HTTP_post, 'post', \
HTTP_receive, 'receive', \
HTTP_find_header_field, 'find_header_field', \
HTTP_free, 'free', \
HTTP_escape, 'escape'
public HTTP_get as '_http_get'
public HTTP_post as '_http_post'
public HTTP_receive as '_http_receive'
public HTTP_find_header_field as '_http_find_header_field'
public HTTP_free as '_http_free'
public HTTP_escape as '_http_escape'
sz_url db 'http://www.ashmew2.me'
identifier dd 0
include_debug_strings
Code: Select all
extern void init_network(void);
extern void open_site(void);
#define NULL 0
int main()
{
__asm__ volatile("int3"::);
init_network();
open_site();
return 0;
}
Code: Select all
load dllhttpbin
g
bp c463
g
r eip=c479
g
d eax
<Now keep pressing d to see the site's content>
g
Code: Select all
section '.flat' code
Code: Select all
#define _S 010
int _DEFUN(isspace,(c),int c)
{
return(__ctype_ptr__[c+1] & _S);
}
Users browsing this forum: No registered users and 28 guests