flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2 |
Author |
|
SFeLi 10 Dec 2010, 14:17
-
Last edited by SFeLi on 10 Dec 2010, 19:06; edited 1 time in total |
|||
![]() |
|
Overflowz 10 Dec 2010, 18:24
SFeLi
Oh sorry, I'll read that ![]() |
|||
![]() |
|
baldr 10 Dec 2010, 20:15
Overflowz,
IIRC Windows (tcpip.sys, to be exact) limits number of outgoing TCP connections per second (around 10? I've patched this already, don't remember exact number). This might not be directly applicable to your problem, though. Add some debug output (or use debugger ![]() |
|||
![]() |
|
Overflowz 10 Dec 2010, 21:15
I'm already using debbuger and everytime I'm using debugger.... But I don't see what happening when calling createthread
|
|||
![]() |
|
baldr 12 Dec 2010, 09:42
Overflowz,
View | Threads (or Alt+T), then Open in CPU (Enter). That will give you context of selected thread. Options | Options... | Debugging | Events | Pause on new thread is another way. |
|||
![]() |
|
Overflowz 12 Dec 2010, 12:28
baldr
Oh thank you ![]() |
|||
![]() |
|
drobole 15 Dec 2010, 07:07
Is it just me or is there something wrong here?
Im thinking that you dont need to call WSAStartup/WSACleanup more than once. Eg. WSAStartup once before you start making threads, and WSACleanup once at the end just before ExitProcess. Also, it seems that the startThread proc is recursive, so if I am correct, your program will call startThread continously until the stack is overflowed, or until the OS runs out of available thread handles (That wouldn't take long as the OS can only have like 8k concurrent threads or something like that) Someone please correct me if I'm wrong here |
|||
![]() |
|
Overflowz 15 Dec 2010, 13:39
I'll not open other thread and I'll post here.. I found information about RAW sockets.. and I'm trying to make simple program that sends raw sockets to server but I think it needs other programming style I guess. Can someone explain me what I'm doing wrong or give me some RAW Sockets example on ASM ? Cause I can't find in google.. Only C and Delphi were found. Thank you.
Code: format PE console 4.0 include 'WIN32AX.INC' entry main section '.data' data readable writeable hSock dd ? wsaData WSADATA saddr sockaddr_in szIp db "127.0.0.1",0 testString db "Testing RAW Sockets..",0 sizeof.testString = $ - testString szWsa db "Error Initializing Winsock Library.",0 szSock db "Error Creating Socket.",0 szConn db "Error Connecting To Server",0 szTitle db "RAW Sockets Example",0 section '.code' code readable executable proc main invoke WSAStartup,0x202,wsaData cmp eax,0 jnz .wsaError invoke socket,AF_INET,SOCK_RAW,255 cmp eax,-1 je .sockError mov [hSock],eax mov [saddr.sin_family],AF_INET invoke htons,80 mov [saddr.sin_port],ax invoke inet_addr,szIp mov [saddr.sin_addr],eax invoke connect,[hSock],saddr,sizeof.sockaddr_in cmp eax,0 jnz .connError invoke send,[hSock],testString,sizeof.testString,0 invoke closesocket,[hSock] invoke WSACleanup invoke ExitProcess,0 .wsaError: invoke MessageBox,0,szWsa,szTitle,MB_OK invoke WSACleanup invoke ExitProcess,0 .sockError: invoke MessageBox,0,szSock,szTitle,MB_OK invoke closesocket,[hSock] invoke ExitProcess,0 .connError: invoke MessageBox,0,szConn,szTitle,MB_OK invoke WSACleanup invoke ExitProcess,0 endp section '.idata' import data readable library user32,'user32.dll',\ kernel32,'kernel32.dll',\ ws2_32,'ws2_32.dll' include 'API\WS2_32.INC' include 'API\KERNEL32.INC' include 'API\USER32.INC' section '.reloc' fixups data readable discardable It says everything is OK, library initialized, socket created, connected, sent and I see nobody is connected and no data is sent to server.. (using netcat) whats problem ? |
|||
![]() |
|
Overflowz 29 Dec 2010, 20:01
Well, if nobody knows just tell me if it's possible what I'm doing ?
|
|||
![]() |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.