'Regex out logins and passwords from a string'

def get_login_pass(self, body):

    user = None
    passwd = None
    userfields = ['log', 'login', 'wpname', 'ahd_username', 'unickname', 'nickname', 'user', 'user_name', 'alias', 'pseudo', 'email', 'username', '_username', 'userid', 'form_loginname', 'loginname', 'login_id', 'loginid', 'session_key', 'sessionkey', 'pop_login', 'uid', 'id', 'user_id', 'screename', 'uname', 'ulogin', 'acctname', 'account', 'member', 'mailaddress', 'membername', 'login_username', 'login_email', 'loginusername', 'loginemail', 'uin', 'sign-in']
    passfields = ['ahd_password', 'pass', 'password', '_password', 'passwd', 'session_password', 'sessionpassword', 'login_password', 'loginpassword', 'form_pw', 'pw', 'userpassword', 'pwd', 'upassword', 'login_passwordpasswort', 'passwrd', 'wppassword', 'upasswd']
    for login in userfields:
        login_re = re.search(('(%s=[^&]+)' % login), body, re.IGNORECASE)
        if login_re:
            user = login_re.group()
    for passfield in passfields:
        pass_re = re.search(('(%s=[^&]+)' % passfield), body, re.IGNORECASE)
        if pass_re:
            passwd = pass_re.group()
    if (user and passwd):
        return (user, passwd)
