Jump to content
Tuts 4 You

Open Webpage With User:pass Combo With Asm


Guest shot

Recommended Posts

Posted (edited)

I have been trying to do this all day and cannot get it right

I have this figured out follow along I hope you can understand this

here is a web page I set up as an example

http://memberspass.6x.to

it requires a username and password combo

Username:

member

Password:

password

you add these to the url like this to login automatically

http://member:password@memberspass.6x.to

I separated the parts

http://

member

:

password

@

memberspass.6x.to

I added

:, @, memberspass.6x.to, http://

to .data section like this

.data

http db "http://",0

sep db ":",0

AT db "@",0

WebPage db "memberspass.6x.to",0

then I added username and password to .data? like this

.data?

username dd ?

password dd ?

what I am trying to accomplish is assemble a url with

the users input on name and password in two edit boxes

and when he/she clicks go it will launch the site and he/she is already in there

without login.

for example someone enters

tommy for username in editbox 1

and stomped for password in editbox 2

those two will be added to a buffer and combined into the url and

the url will then be executed using ShellExecute.

here is all my sources + an exe (3kb)( I commented the important parts)

http://www.sendspace.com/file/ti5rca

I just cant get anything I try to work without something having an error :dunno:

thanks to anybody who helps me.

Edited by shot
Posted

You are not concatenating the user name and pass to the url

.data?

username db 64 dup(?) ;Username will be added second

password db 64 dup(?);The password will be added fourth

Url db 128 dup(?)

First get the input using GetDlgItemText and then concat them

invoke lstrcpy, addr Url, addr http

invoke lstrcat, addr Url, addr username

invoke lstrcat, addr Url, addr sep

invoke lstrcat, addr Url, addr password

invoke lstrcat, addr Url, addr AT

invoke lstrcat, addr Url, addr WebPage

invoke ShellExecute, hWin, addr Operation,addr Url , NULL, NULL, SW_SHOWNORMAL

Posted

Bit ugly, why not use wsprintf?

Ehtyar.

Posted

you will gain **** with that:P

why?

ms**** removed ability to use http://login:pass@host in sp2

you can reenable it on your own risk in explorer and ie, just look for solution on google

Posted (edited)

@yamraaj

thanks for your help I will try it out :thumbsup:

@human

its for firefox only unless patched :D

I just assembled and it works I looked it over and understand exactly how it works(know I feel stupid cause I couldnt figure it out :( )

I finished the rest of the code and it works thanks again!!!

EDIT:

would anybody know how to remove "http://" from the site so the user doesn't have to manually delete it?

I have it so there is an editbox and you enter the site and "http://" is not allowed or it will fail to open the page

I have it so user can click paste and the website is in the editbox is there anyway to scan and remove "http://" ?

Edited by shot

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...