The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: ThatsTheLive on May 09, 2009, 11:39:35 AM

Title: Interaction with websites
Post by: ThatsTheLive on May 09, 2009, 11:39:35 AM
Hi guys,

Is their a way to interact with a website with MASM?
I have to type the same words each day, at the same website.
So I thought a little ASM programme would be usefull.
I know that could easily be done by another language like Perl.
But I want to do it with MASM.

I want to fill out a textbox and than click a button.
Is there a easy to use DLL/API or is it complicated?

Greetings
Title: Re: Interaction with websites
Post by: dedndave on May 09, 2009, 12:03:46 PM
Hi Thats
Welcome to MASM32
someone else was playing with the same thing a couple weeks ago
here is a link to that forum thread...

http://www.masm32.com/board/index.php?topic=11309.0
Title: Re: Interaction with websites
Post by: ThatsTheLive on May 09, 2009, 12:13:18 PM
Thank you, but that's not exactly what I searched.
Because is this example there has to be FF or IE installed, and they open it, and send the keys.

But I would know If there's something like a Web API, which I can directly access with my programme.
So I don't have to open a browser.

I hope you know what I mean.

Title: Re: Interaction with websites
Post by: UtillMasm on May 09, 2009, 02:29:59 PM
no http or webexplorer source, no example source.

do you have Firefox source (masm32 version)? :toothy
Title: Re: Interaction with websites
Post by: ThatsTheLive on May 09, 2009, 03:52:40 PM
I don't get the joke.

I just wanted to know, If there is a WebBrowser API like it is for FTP for example.

And If it's not I would really appreciate it if someone can tell me a alternative, without directly opening another programme.
Because I have to LogIn in a Webpage(fillout 2 textboxes and click a button) and then I want to save the sourcecode in a .text file.
But I don't want to open up FF/IE visible, because it interrupts me.
Title: Re: Interaction with websites
Post by: UtillMasm on May 09, 2009, 04:00:16 PM
http protocol is easy. (just some request, get, put...)

do you want that?
Title: Re: Interaction with websites
Post by: Mark Jones on May 09, 2009, 06:04:41 PM
Quote from: ThatsTheLive on May 09, 2009, 11:39:35 AM
I want to fill out a textbox and than click a button.
Is there a easy to use DLL/API or is it complicated?

Hi, can you tell us why you only need to fill out a textbox and click a button?

I mean, once you "log in" to this website, then what is it used for? Nothing? I fail to see how just "logging in" to a website has any value whatsoever. This sounds more like you are trying to brute-force a password, or some other questionable activity. Regardless, topics which may be used maliciously by others, cannot be discussed in this public forum.

The short answer is yes, it is possible to send commands to a website. The long answer is no, it is not easy. But, if the website is not one you own or belong to, the administrator will eventually notice that something unusual is happening on their page, and take measures to prevent it.
Title: Re: Interaction with websites
Post by: ThatsTheLive on May 09, 2009, 06:14:27 PM
@Mark Jones

No I do not want to do something illegal.
At work, I have to visit the same Page every 3h to check for updates.
And to "get" the updates I have to log in.
So I thought it would be usefull if a programme would do that for me.

@UtillMasm

Yes I think that's what I want.
Is there a more detailed doc how to use it with masm?
Title: Re: Interaction with websites
Post by: dedndave on May 09, 2009, 07:29:26 PM
It's cool Thats

   The reason Mark says that is that what you are describing could be used illicitly.
Many "hackers", as they like to call themselves, would use the same technique to
create password crackers, bot makers and all that kind of thing that we frown on.
Do not take it personally.
   As for accessing a webpage in that manner, I have been told it is not a simple
thing. It requires a pretty good understanding of the internet itself, as well as
knowledge of HTML, XML, Java, CSS, PHP and a host of other specifications.
(did you catch that? - "host"  :lol :clap:) If you are new to MASM, this is
probably not a good place to start.
Title: Re: Interaction with websites
Post by: Mark Jones on May 09, 2009, 07:39:30 PM
Agreed. It can be done, but accessing the website and sending and receiving data depend not only on the website design layout, but your programming skill. Take a look at the following thread, it gives a general idea where to begin and links to the Madwizard networking tutorial.

http://www.masm32.com/board/index.php?topic=9649.0
Title: Re: Interaction with websites
Post by: ThatsTheLive on May 10, 2009, 06:06:35 AM
Thank you guys.
Great help =)

I think. I've enough information now...

Title: Re: Interaction with websites
Post by: Vortex on May 10, 2009, 09:08:29 AM
Winsock networking tutorial (C++ or win32asm) (http://www.madwizard.org/programming/tutorials/)

httpdASM (http://japheth.de/httpdASM.html)