Grab request password with ASCII character

Mehdi Ravanbakhsh babakco at gmail.com
Mon Apr 29 15:30:32 CEST 2013


Hi  Alll

i need to Grab request password to insert in database if
Cleartext-Password  is "import" so i write this unlang script in
authenticate section :


Auth-Type PAP {
        pap {
            reject = 1
        }
            if (reject) {

                if ("%{control:Cleartext-Password}"=="import" ) {

                ok
                    update control {
                        password-import = "%{sql:SELECT
change_impoprt_password
('%{User-Name}'::varchar,'%{User-Password}'::varchar)}"
                        Log-State := "New Password Is Imported"
                    }

                }

                else {

                    if (("%{control:Bad-Password-Pool}") &&
("%{control:Bad-Password-Pool}" != "" ) ) {

                    ok

                        update control {
                            Auth-Type := "Accept"
                            Pool-Name := "%{control:Bad-Password-Pool}"
                            Log-State := "PAP Password Is Not Correct"
                        }
                        update reply {
                            Reply-Message = "Your Password in not correct
in system"
                        }


                    }
                    else {

                        update control {
                            Log-State := "PAP Password Is Not Correct -
Reject"
                            Auth-Type := "Reject"
                        }
                        update reply {
                            Reply-Message := "Your Password in not correct
in system"
                        }

                    }
                }
        ok
        }
    }


but if user use symbols like ! @#& or any character that is based on  ASCII
character  i can not get  real password character for example :

import password is : "test!@#"
request:user-password is   : "test=21@=23"

do we have any way to get or convert request:user-password to none ASCII .
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20130429/137accb8/attachment-0001.html>


More information about the Freeradius-Users mailing list