Reply to topic  [ 6 posts ] 
Reverse engineering 
Author Message
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 7:35 pm
Posts: 6580
Location: Getting there
Reply with quote
Would it be possible to look at the source code of a website in order to reverse engineer the APIs and write a program to access the website separately?

i.e. The company I train with has a website (http://www.britmilfit.com) and I can log in and check my details (attendance, fitness results, etc...).

Would I be able to write a Java client or iPhone app to access the site and view my details?

_________________
Oliver Foggin - iPhone Dev

JJW009 wrote:
The count will go up until they stop counting. That's the way counting works.


Doodle Sub!
Game Of Life

Image Image


Last edited by Fogmeister on Tue Aug 03, 2010 11:48 pm, edited 1 time in total.



Tue Aug 03, 2010 5:15 pm
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
It depends I guess...

Theoretically, yes. But if you need a separate username/password to get into the database (which may be passed by a PHP file when you sent your username/password) then you may be scuppered...


Tue Aug 03, 2010 5:57 pm
Profile WWW
Spends far too much time on here
User avatar

Joined: Thu Apr 23, 2009 9:40 pm
Posts: 4876
Location: Newcastle
Reply with quote
Fogmeister wrote:
Would it be possible to look at the source code of a website in order to reverse engineer the APIs and write a program to access the website separately?

i.e. The company I train with has a website (http://www.britmilfit.co.uk) and I can log in and check my details (attendance, fitness results, etc...).

Would I be able to write a Java client or iPhone app to access the site and view my details?

Brit MILF IT? Sounds like an awesome place to work!

You could..... entirely depends on how the site is written, what language is used for it etc, no reason not to in most cases, for instance in ASP.net you can make a web service, and from the client side generate the info, send it then process the result from the server. It's part of what I do at work ATM pooling data from different sites into a localised section :)

_________________
Twitter
Charlie Brooker:
Macs are glorified Fisher-Price activity centres for adults; computers for scaredy cats too nervous to learn how proper computers work; computers for people who earnestly believe in feng shui.


Tue Aug 03, 2010 6:56 pm
Profile
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 7:35 pm
Posts: 6580
Location: Getting there
Reply with quote
finlay666 wrote:
Fogmeister wrote:
Would it be possible to look at the source code of a website in order to reverse engineer the APIs and write a program to access the website separately?

i.e. The company I train with has a website (http://www.britmilfit.co.uk) and I can log in and check my details (attendance, fitness results, etc...).

Would I be able to write a Java client or iPhone app to access the site and view my details?

Brit MILF IT? Sounds like an awesome place to work!

You could..... entirely depends on how the site is written, what language is used for it etc, no reason not to in most cases, for instance in ASP.net you can make a web service, and from the client side generate the info, send it then process the result from the server. It's part of what I do at work ATM pooling data from different sites into a localised section :)

Yeah, our company is (very slowly) moving over to web services for things like our customer facing site and a possible e-commerce site etc...

I've presented a few ideas and written a proof of concept iPhone app so I can see how it works from our side.

But I wouldn't have anyone on the inside.

I'll have to have a proper look at the code to see what's happening.

_________________
Oliver Foggin - iPhone Dev

JJW009 wrote:
The count will go up until they stop counting. That's the way counting works.


Doodle Sub!
Game Of Life

Image Image


Tue Aug 03, 2010 7:40 pm
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 9:40 pm
Posts: 5288
Location: ln -s /London ~
Reply with quote
Fogmeister wrote:
I'll have to have a proper look at the code to see what's happening.

I'd be looking at the POST and GET vars. And then I guess you'll have to scrape the results for the info that you want.

_________________
timark_uk wrote:
Gay sex is better than no sex

timark_uk wrote:
Edward Armitage is Awesome. Yes, that's right. Awesome with a A.


Wed Aug 04, 2010 9:12 am
Profile
What's a life?
User avatar

Joined: Thu Apr 23, 2009 8:25 pm
Posts: 10691
Location: Bramsche
Reply with quote
Yep, you can't look at the code, per se. The code that runs the site stays on the server and it just chucks out the formatted HTML.

You need to look at the way the forms are made up and whether it uses POST forms or tacks everything onto the URL.

You would need to emulate the POST or GET variable set and you'd need to work out how to extract the information that is being returned, so that you just have the raw data you need.

The Java or iPhone app would need to them emulate an http connection.

The downside is, if they work out what you are doing and are not happy with it, then they just need to change the variable names or the output formatting (something which is likely to happen over time anyway) and your app is useless, until you write a new version.

A better approach would be to contact the company and ask if they have an offical API, for example sending and receiving an XML stream, which is more structured, easier to work with and you will be doing it officially, so you will get advanced warning over any changes to the structure, as opposed to your app being broken, until you can work out what they've done and react...

_________________
"Do you know what this is? Hmm? No, I can see you do not. You have that vacant look in your eyes, which says hold my head to your ear, you will hear the sea!" - Londo Molari

Executive Producer No Agenda Show 246


Wed Aug 04, 2010 12:28 pm
Profile ICQ
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.