flat assembler
Message board for the users of flat assembler.

Index > Windows > Open Website and HTTP Commands.

Author
Thread Post new topic Reply to topic
Trentie89



Joined: 01 Feb 2017
Posts: 26
Location: Perth, Australia.
Trentie89 13 Mar 2017, 05:49
Hi Guys,

How do i send HTTP data in fasm.?. I Simply want to say, make the program open the website www.google.com.au, but not actually opening it in a new window, just sending HTTP data.

Trent.

_________________
I Am the greatest.!. ( NOT YET ).
Post 13 Mar 2017, 05:49
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20422
Location: In your JS exploiting you and your system
revolution 13 Mar 2017, 06:24
There are already a few solutions posted on this board. Good search terms could be "winsock" and "WSAStartup"
Post 13 Mar 2017, 06:24
View user's profile Send private message Visit poster's website Reply with quote
Trentie89



Joined: 01 Feb 2017
Posts: 26
Location: Perth, Australia.
Trentie89 13 Mar 2017, 06:44
URLDownloadToFile

Would be a good API.?. And thanks revolution, your awesome, i did search, and found that.

Since i am a newb at FASM(Im going to read all the tutorials over this coming weeks) can you
show me how to invoke it with some simple code.?. Thanks brother.

Trent.
Post 13 Mar 2017, 06:44
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20422
Location: In your JS exploiting you and your system
revolution 13 Mar 2017, 07:04
URLDownloadToFile is a high level API, you don't get much control over the sending of the HTTP data. Winsock allows more flexibility.
Post 13 Mar 2017, 07:04
View user's profile Send private message Visit poster's website Reply with quote
Trentie89



Joined: 01 Feb 2017
Posts: 26
Location: Perth, Australia.
Trentie89 13 Mar 2017, 07:57
The reason i want to send data via HTTP is because i am collecting data with my Arduino microcontroller and i want to send the details remotely via HTTP so that my mate can see them 5,000 km away.!.
Post 13 Mar 2017, 07:57
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20422
Location: In your JS exploiting you and your system
revolution 13 Mar 2017, 09:15
HTTP is a client/server type protocol. It makes a difference in the code if you are writing the client or the server.

If you want to send data to a remote location then one end will be the client and the other will be the server. It doesn't matter which end is which role, just as long a they are not the same.

But I wonder if HTTP is the best protocol for you in your case? There are other protocols that might be easier. You can use Winsock for other protocols also.
Post 13 Mar 2017, 09:15
View user's profile Send private message Visit poster's website Reply with quote
Trentie89



Joined: 01 Feb 2017
Posts: 26
Location: Perth, Australia.
Trentie89 13 Mar 2017, 11:17
Ahh okay, yes i think HTTP is as i am running my asm code as a client to a PHP Server.

But, where can i learn about winsock apis in fasm.?. If you say that's best even for HTTP.

Trent.
Post 13 Mar 2017, 11:17
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20422
Location: In your JS exploiting you and your system
revolution 13 Mar 2017, 12:19
I'm not saying it is best. Just that you can completely control the HTTP protocol with winsock. If you want something "easier" then there are higher level APIs that will do all the HTTP stuff for you. I was just commenting on your initial request to "just [send] HTTP data".
Post 13 Mar 2017, 12:19
View user's profile Send private message Visit poster's website Reply with quote
Trentie89



Joined: 01 Feb 2017
Posts: 26
Location: Perth, Australia.
Trentie89 13 Mar 2017, 22:21
Can i use URLDownloadToFile with fasm.?. Which library.?.
Post 13 Mar 2017, 22:21
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20422
Location: In your JS exploiting you and your system
revolution 14 Mar 2017, 00:11
That API isn't in the normal set of API defintions that asm comes with. But you can add it

A quick search shows that this is in Urlmon.dll. So you can make a new definition for it and update the sources to include it.
Post 14 Mar 2017, 00:11
View user's profile Send private message Visit poster's website Reply with quote
Trentie89



Joined: 01 Feb 2017
Posts: 26
Location: Perth, Australia.
Trentie89 15 Mar 2017, 02:08
I'm trying to get my head around all this. As you know, i am a beginner. I can do most things,
i know how to call API's and such, but am not entirely familiar with ASM Completely yet. I've been
looking at the amazingly awesome tool quetannon, someone posted. It would be nice if one of you
guys could just show me here some simple code to make a winsock connection to localhost:80.

Thankx.!.
Post 15 Mar 2017, 02:08
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.