Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Some problems of addslashes

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

As for wide byte injection, if someone has written it, I won't write more:

Https://www.91ri.org/8611.html

Http://netsecurity.51cto.com/art/201404/435379_4.htm

For the iconv () function, I tried to write a url transcoding between utf-8 and gbk

Import os,urllibprint "" if u want change gbk to utf-8,please input gbk,so as input utf-8.input exit and exit Others make u try agin "" st= raw_input () def utf8cwgbk (st): if st== "utf-8": print "input string" url1 = raw_input () st1 = urllib.unquote (url1) st2 = st1.decode ("utf-8"). Encode ("gbk") url2 = urllib.quote (st2) print "url Code of utf-8-url compilation of gbk Code-utf-8 's Chinese character-gbk's Chinese character "" print url1 '- -', url2,'---',st1,'---' St2 os.system ('pause') if st== "gbk": print "input string" url1 = raw_input () st1 = urllib.unquote (url1) st2 = st1.decode ("gbk"). Encode ("utf-8") url2 = urllib.quote (st2) print "" url code of utf-8-url code of gbk-Chinese character of utf-8- -- the Chinese character "" print url1 "of gbk '-', url2,'---',st2,'---',st1 os.system ('pause') if st== "exit": os.system (' exit') else: print "" please try again.if u want change gbk to utf-8,please input gbk,else input utf8 " Finally input exit "" st = raw_input () utf8cwgbk (st) if _ name__== "_ _ main__": utf8cwgbk (st)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report