我最近在我的网站上有一个暴力破解者,并想把它写在某个地方.坏消息是日志文件本身是1,4 GB大(4338995行),我还没有使logrotate完全正常工作.
所以我想知道如何删除Sublime中不包含某个字符串的所有行.由于文件太大,几乎无法读取,我无法真正了解它.它包含普通用户和两个不同IP地址的两个暴力(可能是同一个人).
它看起来像这样(所有个人信息和IP地址都已更改.):
163.33.74.115 - - [28/Apr/2017:13:00:06 +0200] "HEAD /box1_rhs/ HTTP/1.1" 404 157 "-" "DirBuster-0.12 (http://www.owasp.org/index.php/Category:OWASP_DirBuster_Project)"
163.33.74.115 - - [28/Apr/2017:13:00:06 +0200] "HEAD /isaac_working/ HTTP/1.1" 404 157 "-" "DirBuster-0.12 (http://www.owasp.org/index.php/Category:OWASP_DirBuster_Project)"
66.29.166.6 - - [28/Apr/2017:13:00:06 +0200] "GET /index.php HTTP/1.1" 200 2898 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
163.33.74.115 - - [28/Apr/2017:13:00:06 +0200] "HEAD /title_bykergrove_red/ HTTP/1.1" 404 157 "-" "DirBuster-0.12 (http://www.owasp.org/index.php/Category:OWASP_DirBuster_Project)"
163.33.74.115 - - [28/Apr/2017:13:00:06 +0200] "HEAD /games_title/ HTTP/1.1" 404 157 "-" "DirBuster-0.12 (http://www.owasp.org/index.php/Category:OWASP_DirBuster_Project)"
66.29.166.6 - - [28/Apr/2017:13:00:06 +0200] "GET /info.php HTTP/1.1" 200 …Run Code Online (Sandbox Code Playgroud) 我对 ElasticSearch 不太有经验,想知道如何根据某个整数值增强搜索。
这是一个文档的示例:
{
"_index": "links",
"_type": "db1",
"_id": "mV32vWcBZsblNn1WqTcN",
"_score": 8.115617,
"_source": {
"url": "example.com",
"title": "Example website",
"description": "This is an example website, used for various of examples around the world",
"likes": 9,
"popularity": 543,
"tags": [
{
"name": "example",
"votes": 5
},
{
"name": "test",
"votes": 2
},
{
"name": "testing",
"votes": 1
}
]
}
}
Run Code Online (Sandbox Code Playgroud)
现在,在这个特定的搜索中,重点是 ,tags我想知道如何增强并将其乘以下面_score的整数。votestags
如果这是不可能的(或者很难实现),我只是想知道如何_score通过votes(不在tags)来提高
_score例如,为中的每个整数添加 0.1votes …
我目前正在为本地服务器开发 mp3 播放器网站。它包括一个“播放器”和下面的歌曲列表。
问题是当重定向到另一首歌曲(通过单击或 javascript 重定向)时,它会滚动到页面顶部。当我远离列表并点击一首歌时,这很烦人。
它在刷新页面时保持位置,但不与重定向。
网址如下所示:
http://192.168.1.130/music/listen.php?id=SongName
Run Code Online (Sandbox Code Playgroud)
在重定向期间唯一改变的是 id 的歌曲名称。
对于重定向本身,它是执行操作的单击或 JavaScript。
<tr>
<td><a href="/music/listen.php?id=AnotherSong">AnotherSong</a></td>
<td>11.04.2019 15:52</td>
</tr>
Run Code Online (Sandbox Code Playgroud)
window.location.href = "/music/listen.php?id=AnotherSong";
Run Code Online (Sandbox Code Playgroud)
是否有任何 JavaScript / HTML 功能可以保持滚动位置?或者我可能需要将滚动位置存储在某处并在重定向完成后再次设置位置?
boost ×1
brute-force ×1
filter ×1
html ×1
javascript ×1
logging ×1
regex ×1
replace ×1
sublimetext ×1