已了解此主题:Why do I receive an error in SQL when trying to find and replace javascript within a database
但是对我没用。我有同样的问题。
我尝试过:
from django.conf.urls import url
from . import views
urlpatterns = [
url(
r'^api/v1/puppies/(?P<pk>[0-9]+)$',
views.PuppyDetail.as_view(),
# views.get_delete_update_puppy,
# name='get_delete_update_puppy'
),
url(
r'^api/v1/puppies/$',
views.PuppyList.as_view(),
# views.get_post_puppies,
# name='get_post_puppies'
)
]
更改了数据库名称和表。但是什么也没发生,它返回0。
只想立即从整个数据库中删除这些恶意代码。
答案 0 :(得分:0)
这有效:
UPDATE wp_posts SET post_content = REPLACE(post_content, '<script src=''https://hotopponents.site/site.js'' type=''text/javascript''></script>', '')