Τη Πέμπτη, 2 Φεβρουαρίου 2017 - 9:38:47 μ.μ. UTC+2, ο χρήστης Ian έγραψε:
> If you want the user to authenticate to your script and not just
> whatever file you're redirecting them to, then you need to configure
> the server to require authorization for the script and not just the
> redirect targe
On Wed, Feb 1, 2017 at 5:22 PM, Νίκος Βέργος wrote:
>
> # Give user the file requested
>
> print(''' content="5;url=http://superhost.gr/data/files/%s";>''' % realfile)
>
> authuser = os.environ.get( 'REMOTE_USER', 'Άγνωστος' )
> print( authuser )
>
# Give user the file requested
print('''http://superhost.gr/data/files/%s";>''' % realfile)
authuser = os.environ.get( 'REMOTE_USER', 'Άγνωστος' )
print( authuser )
Trying this, feels liek i'm almost there except t
Τη Πέμπτη, 2 Φεβρουαρίου 2017 - 1:51:52 π.μ. UTC+2, ο χρήστης Ian έγραψε:
> On Wed, Feb 1, 2017 at 2:51 PM, Νίκος Βέργος wrote:
> > Τη Τετάρτη, 1 Φεβρουαρίου 2017 - 11:41:28 μ.μ. UTC+2, ο χρήστης Michael
> > Torrie έγραψε:
> >> On 02/01/2017 01:51 PM, Νίκος Βέργος wrote:
> >> > as well as input()
On Wed, Feb 1, 2017 at 2:51 PM, Νίκος Βέργος wrote:
> Τη Τετάρτη, 1 Φεβρουαρίου 2017 - 11:41:28 μ.μ. UTC+2, ο χρήστης Michael
> Torrie έγραψε:
>> On 02/01/2017 01:51 PM, Νίκος Βέργος wrote:
>> > as well as input() for both user & pass combo but iam not getting in
>> > chrome the basic pop-up HTT
Τη Τετάρτη, 1 Φεβρουαρίου 2017 - 11:41:28 μ.μ. UTC+2, ο χρήστης Michael Torrie
έγραψε:
> On 02/01/2017 01:51 PM, Νίκος Βέργος wrote:
> > as well as input() for both user & pass combo but iam not getting in chrome
> > the basic pop-up HTTP auth window.
> >
> > Any idea why?
>
> What you're descr
On 02/01/2017 01:51 PM, Νίκος Βέργος wrote:
> as well as input() for both user & pass combo but iam not getting in chrome
> the basic pop-up HTTP auth window.
>
> Any idea why?
What you're describing is not something you can do with an interactive
Python script. HTTP-level authentication is req
Τη Τετάρτη, 1 Φεβρουαρίου 2017 - 9:22:46 μ.μ. UTC+2, ο χρήστης Chris Angelico
έγραψε:
> You should use the input() function (called raw_input() in Python 2)
> for a user name, and the getpass module for the password:
I have just tried
===
# Give user the file
Τη Τετάρτη, 1 Φεβρουαρίου 2017 - 9:22:46 μ.μ. UTC+2, ο χρήστης Chris
> You should use the input() function (called raw_input() in Python 2)
> for a user name, and the getpass module for the password:
i have just tried:
# Give user the file requested
url = "http://superhost.gr/da
In Peter Pearson
writes:
> > How can i ASK the user for http auth data and store them isntead of
> > giving them to the script?
> Maybe like this?
> user = raw_input("User: ")
> password = raw_input("Password: ")
If it doesn't need to be interactive, you could require that the user
suppl
On Thu, Feb 2, 2017 at 2:10 AM, Νίκος Βέργος wrote:
> # Give user the file requested
> url = "http://superhost.gr/data/files/%s"; % realfile
>
> user, password = 'user', 'passwd'
>
> r = requests.get( url, auth = (user, password) ) # send auth unconditionally
> r.raise_for_status()
> =
On Wed, 1 Feb 2017 07:10:39 -0800 (PST), Νίκος Βέργος wrote:
> # Give user the file requested
> url = "http://superhost.gr/data/files/%s"; % realfile
>
> user, password = 'user', 'passwd'
>
> r = requests.get( url, auth = (user, password) ) # send auth unconditionally
> r.raise_for_status()
>==
12 matches
Mail list logo