1 #Coding:utf82 ImportRequests3 deflogin ():4URL ='Http://back.xiyilang.cc/staff/login.json'5headers={'x-forwarded-for':'127.0.0.1'}#IP Conversion6Data={7 'Staffcode':'00025',#User8 'Password':'123456',#Password9 }Tenx = Requests.post (url,data,headers=headers)#Login account Password OneCookie = x.cookies#cookie=cookies Get cookie wait for next call A returnCookies -Cookie =Login () - defLvaue (ID): theURL ='Http://back.xiyilang.cc/admin/staff-admin!search.json' -headers = {'x-forwarded-for':'127.0.0.1'} -data = { - 'StaffID': ID, + } -x = Requests.post (url,data,headers=headers,cookies=cookie). Text#make a call to the cookie again + Printx AY=raw_input ('ID:') atLvaue (y)
*
Input () #危险 __import__ (' OS '). System (' dir ') executable
Raw_imput ()
Input () is actually implemented using Raw_input (), just after calling Raw_input () and then invoking the Eval () function, so you can even use the expression as an argument to input (), and it evaluates the expression and returns it.
In built-in Functions, however, there is a sentence that reads: Consider using the Raw_input () function for general input from users.
Unless there is a special need for input (), it is generally recommended to use raw_input () to interact with the user
Python post submission