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