python 字符串截斷


>>> s = '%20and%201=2%20union%20select%201,group_concat%28table_name%29,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20%20from%20information_schema.tables%20where%20table_schema=database%28%29'
>>> b = 'roup_concat%28table_name%29'
>>> before = s[:s.index(b)-1]
>>> after = s[s.index(b)+len(b):]
>>> before
'%20and%201=2%20union%20select%201,'
>>> after
',3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20%20from%20information_schema.tables%20where%20table_schema=database%28%29'
>>> 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM