Nome Utente: 
Password : 
Restringi sessione all'IP 
Online in 1gg

I have a problem sending data via http post  Vai alla sfida "Blinded by the light"

Posizione globale: 3543
Punteggio totale: 6024
Posts : 6
Grazie: 2
Voti+: 2
Registrato: 13a 257gg

Ultima visita: 1a 262gg
L'utente è Offline
I have a problem sending data via http post
Google/traduci0Grazie!0Bel post!0Brutto post! Link
Following python code(2.7.5) is expected to show "Welcome back, user." But it shows "Your password is wrong," (This code does not contain the solution related to this challenge)
import re
import urllib
import urllib2


url = 'http://www.wechall.net/challenge/blind_light/index.php'
headers = { 'Cookie' : 'WC=~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'}

values = {'inject' : "' or 1=1#"}
data = urllib.urlencode(values)
req = urllib2.Request(url, data, headers)
response = urllib2.urlopen(req)
html = response.read()
print html

if re.findall("Welcome back, user.",html):
print "success",
else:
print "fail",

I tested this code with my testing website, and it worked well. But in wechall.net it didn't work as expected. Just sending one apostrophe or %27 through this code didn't show 'Database error'. What's the problem?
Posizione globale: 40
Punteggio totale: 305271
Posts : 22
Grazie: 34
Voti+: 31
Registrato: 17a 257gg
Avatar di Mawekl



Ultima visita: 1a 220gg
L'utente è Offline
RE: I have a problem sending data via http post
Google/traduci1Grazie!0Bel post!0Brutto post! Link
Maybe you need to add "Content-Type: application/x-www-form-urlencoded" header field?
Posizione globale: 3543
Punteggio totale: 6024
Posts : 6
Grazie: 2
Voti+: 2
Registrato: 13a 257gg

Ultima visita: 1a 262gg
L'utente è Offline
RE: I have a problem sending data via http post
Google/traduci0Grazie!0Bel post!0Brutto post! Link
I tried, but it didn't work.
Posizione globale: 3543
Punteggio totale: 6024
Posts : 6
Grazie: 2
Voti+: 2
Registrato: 13a 257gg

Ultima visita: 1a 262gg
L'utente è Offline
RE: I have a problem sending data via http post
Google/traduci1Grazie!1Bel post!0Brutto post! Link
I solved the problem, I should have sent 2 data, {'inject' : "Inject", 'injection' : "~~query~~"}
Redknee, silenttrack, n0tHappy, nonfungiblesecurity, quangntenemy, TheHiveMind, Z, balicocat, Ge0, arraez, jcquinterov, hophuocthinh, alfamen2, burhanudinn123, Ben_Dover, stephanduran89, braddie0, fpombal, csuquvq utenti hanno sottoscritto il thread e ricevo le E-Mail di notifica.
1 persone stanno visualizzando il thread.
Questo thread è stato visualizzato 7455 volte.

PHP Fatal Error(1): Constant E_STRICT is deprecated since 8.4, the error level was removed in www/protected/config.php line 6


Backtrace starts in [unknown file] line ?. GWF_Debug::shutdown_function() core/inc/util/GWF_Debug.php line 109. GWF_Debug::error_handler().... core/inc/util/GWF_Debug.php line 180.