hai all ,

i have a string
s= The POST variable NM_xwTapCtl%24_img_Banner is vulnerable.,The POST variable NM_xwTapCtl%24scrollTop is vulnerable.

I dont know the procedure to modify that s to

s = NM_xwTapCtl%24_img_Banner,NM_xwTapCtl%24scrollTop


HELP ME PLEASE!!!!!!!!!!!!!!

Recommended Answers

All 3 Replies

check string method .replace(old, new)

Like:

target = 's= The POST variable NM_xwTapCtl%24_img_Banner is vulnerable.,The POST variable NM_xwTapCtl%24scrollTop is vulnerable.'
target = target.replace('The POST variable','').replace(' is vulnerable.','').replace(' ','')
print target

some times the s= 'The POST variable NM_xwTapCtl$xwTap_txtFocus has been set to ACUstart446634811491',",;ACUend .,The POST variable NM_xwTapCtl$xwTap_txtFocus has been set to ACUstart448344811981',",;ACUend.'

What exactly are you looking for and what exactly to do want to replace it with? You can also use string.find which will return the starting position or -1. If you want to remove "The POST" and "is vulnerable" then replace() is the simplest way to go.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.