Results 1 to 12 of 12

Thread: Inet POST data

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Inet POST data

    Hi guys,

    im using INET to post data...and as i've seen it manages to post it...but...

    when i put :

    code Code:
    1. inet1.execute "url", dataToSend & ""
    dataToSend has all included...cookies and data to send...

    then... in the debugger i found that my data is well put, but at the top of the sending process INET puts it own headers!!

    I cannot manage to remove them.::

    Example: INET HEADERS
    Code:
    POST / HTTP/1.1
    Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
    User-Agent: Microsoft URL Control - 6.01.9782
    Host: www.platinumw.org
    Content-Length: 713
    Cache-Control: no-cache
    Cookie: __utma=258018635.1881335297716277000.1232207329.1232366096.1232383319.13; __utmz=258018635.1232207329.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); platw_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A0%3A%22%22%3Bs%3A6%3A%22userid%22%3Bi%3A-1%3B%7D; platw_sid=d08ed7633aa77d8d4357773d26e1b346
    THEN COME MINE:
    Code:
    POST /login.php HTTP/1.1
    Host: www.platinumw.org
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    .....
    .....

    Any idea how to remove its heeaders??


    thanks
    Thanks for helping me out.

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Re: Inet POST data

    Any ideas
    Thanks for helping me out.

  3. #3
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Inet POST data

    batori,

    You are only showing the one statement

    Inet1.Execute "url", dataToSend & ""

    but I need to see the entire sequence of statements that you are using otherwise I cannot determine exactly what is taking place.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Re: Inet POST data

    Ok, let me try that....
    last time i tried something like that i got an error message...
    Thanks for helping me out.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Re: Inet POST data

    Error: unable to complete request

    this way it sends data :

    Inet1.Execute "url", "POST", dataToSend & ""


    but again it's sending standard inet headers which i need to change
    Thanks for helping me out.

  6. #6
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Inet POST data

    You don't seem to understand. I have seen your other threads here and you seem to have the same problem. You are not thurough in your descriptions of your problems. If you want help then you need to start helping us to help you. Give complete sequences of your code. I can't help you based on a single line of code because it may be the rest of your code that leads up to your problem

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Re: Inet POST data

    This code works pefectly when using WINSOCK...

    The thing is i have to make it work on INET...and i tried everything i could and it didnt work....

    Code:
    LoginInputingW = "username=" & txtUsernameW.Text & "&password=" & txtPasswordW.Text & "&autologin=on&&redirect=&login=Log+in"
    LoginLengthW = Len(LoginInputingW)  'Len("username=" & txtUsername.Text & "&password=" & txtPassword.Text & "&redirect=&login=Log+in")
    
    LoginDataW = LoginDataW & "POST /mysite.php?mode=login HTTP/1.1" & vbCrLf
    LoginDataW = LoginDataW & "Host: www.mysite.org" & vbCrLf
    LoginDataW = LoginDataW & "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3" & vbCrLf
    LoginDataW = LoginDataW & "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" & vbCrLf
    LoginDataW = LoginDataW & "Accept-Language: en-gb,en;q=0.5" & vbCrLf
    LoginDataW = LoginDataW & "Accept-Encoding: gzip , deflate" & vbCrLf
    LoginDataW = LoginDataW & "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7" & vbCrLf
    LoginDataW = LoginDataW & "Keep-Alive: 300" & vbCrLf
    LoginDataW = LoginDataW & "Connection: keep-alive" & vbCrLf
    LoginDataW = LoginDataW & "Referer: http://mysite.org/ucp.php?" & vbCrLf
    LoginDataW = LoginDataW & "Cookie: " & vbCrLf
    LoginDataW = LoginDataW & "Content-Type: application/x-www-form-urlencoded" & vbCrLf
    LoginDataW = LoginDataW & "Content-Length: " & LoginLengthW & vbCrLf & vbCrLf
    
    LoginDataW = LoginDataW & LoginInputingW
    Then just winsock SENDATA LoginDataW

    I dont know how to use that properly on INET
    Thanks for helping me out.

  8. #8
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Inet POST data

    I will assume that /mysite.php is the name of a CGI program that runs on the server and not the site you are connecting to. I will take your word for it that ?mode=login is OK where you have it but I think it belongs in the argument list like this:

    LoginInputingW = "mode=login&username=" &
    txtUsernameW.Text & "&password=" & txtPasswordW.Text & "&autologin=on&redirect=&login=Log+in" & vbCrLf

    LoginDataW = LoginDataW & "POST /mysite.php HTTP/1.1" & vbCrLf

    But anyway what you are doing wrong is that you have POST two times:

    Here....

    LoginDataW = LoginDataW & "POST /mysite.php?mode=login HTTP/1.1" & vbCrLf

    and here...

    Inet1.Execute "url", "POST", LoginDataW & ""

    Your Inet command should be this....

    Inet1.Execute .URL, LoginDataW

    Use .URL and not "url"

    You don't need the final & ""

    NOTE:

    Now the next time you have a question make sure you include all information needed to solve the situation.
    Last edited by jmsrickland; Feb 10th, 2009 at 07:56 PM.

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Re: Inet POST data

    But anyway what you are doing wrong is that you have POST two times:

    Here....
    Well the problem is that when i post with inet i post like this :

    Code:
    POST /ucp.php? HTTP/1.1
    Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
    User-Agent: Microsoft URL Control - 6.01.9782
    Host: www.site.org
    Content-Length: 117
    Cache-Control: no-cache
    Cookie: phpbb3_1zg41_k=; phpbb3_1zg41_u=1; phpbb3_1zg41_sid=8ad76fa4fedaf167497e4503d8656065
    
    username=USERNAME&password=PASS&autologin=on&redirect=ucp.php&sid=6e65949dd18d17ae6c17b0664b9e2cc1&login=Login
    When i do it as i do it with winsock it looks like this: THIS ONE WORKS!
    Code:
    POST /ucp.php?mode=login HTTP/1.1
    Host: www.site.org
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-gb,en;q=0.5
    Accept-Encoding: gzip , deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    Referer: http://warezme.org/ucp.php?
    Cookie: 
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 115
    
    username=USER&password=PASS&autologin=on&redirect=ucp.php&sid=6e65949dd18d17ae6c17b0664b9e2cc1&login=Login
    i can put redirect="" still works (even without the sid)

    The thing is that i need to put more data in the POST header which i cant do.
    Basically i need to COPY the data used to send over winsock on inet...

    i didnt find a way to put more data in the predifined inet "POST" system/header i dont know how to call it
    Thanks for helping me out.

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Re: Inet POST data

    no ideas? :S
    Thanks for helping me out.

  11. #11
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Inet POST data

    What's the issue here? Reading the manual goes a long way. See Execute Method.

    This should make it clear how you specify additional request headers, in other words Execute has four parameters - one of them for request headers.

    POST is not a header, it's the command (method) line.

  12. #12

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Re: Inet POST data

    OK ill try it first thing tomorrow
    Thanks for helping me out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width