自定义Janusec Application Gateway拦截界面

U2      2020-02-23 17:05      134     

Janusec Application Gateway的默认拦截界面是这样的:

Janusec应用网关拦截SQL注入

如果希望修改这个界面,需要自行修改 /gateway/template.go 并重新编译。

下载源码

go get -u github.com/Janusec/janusec
cd $GOPATH/src/github.com/Janusec/janusec

将 /gateway/template.go 中的这一段修改为期望的样式:

var blockHTML = `<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title></head>
<body bgcolor="white">
<center><h1>
<a href="http://www.janusec.com" target="_blank">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAM8AAAA2CAMAAAEgxQ0qAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGwUExURaampr+/v39/f////4eHh5mZmaWlpampqaenp5+fn5eXl6+vr5OTk7m5udvb2+Pj4+/v7/v7+wAAAA4ODicnJ0dHR29vb9/f38vLy4WFhTk5ORoaGhQUFDExMVVVVc/Pz4+Pj9PT0+3t7f39/Zubm+np6QwMDJ2dnQgICAYGBrOzsyEhIQUFBQICAgkJCUVFRcHBwQsLCyMjI/Pz8xAQEFdXV62trcfHx7W1tbe3t0NDQxsbG2tra93d3fHx8ff3942NjZWVlXl5eRkZGYmJiaGhodfX11lZWc3NzYCAgGVlZQ0NDQQEBF5eXuHh4YODg3h4eBgYGFJSUmRkZDg4OAcHB+vr6+fn5xISEisrKzAwML29vdXV1fn5+aurq4aGhj09PVRUVGlpaRMTEzIyMioqKlFRUX19ffX19Q8PDygoKLu7u8PDw9HR0dnZ2SwsLBEREYuLi+Xl5YGBgZGRkVhYWB4eHsXFxXp6ekRERHZ2drGxsSYmJm1tbXt7e0hISAoKCkFBQWBgYKOjo3BwcEJCQsnJySQkJD4+Pj8/P0ZGRhcXFyUlJXJyciIiIgAAANbEhrwAAACQdFJOU///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AANl54cAAAAJcEhZcwAAFxEAABcRAcom8z8AAAloSURBVFhHxVlLcusqE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Janusec Application Gateway, an application security solution which provides WAF (Web Application Firewall), CC attack defense, unified web administration, certificate protection, and scalable load balancing." >
</a>
</h1></center>
<hr>
<center>Reason: {{.VulnName}}, Policy ID: {{.PolicyID}}, by Janusec Application Gateway</center>
</body>
</html>
`

然后重新编译发布:

go build
su
./release.sh

在dist目录下,就可以找到新编译的安装包了。

 

本文地址: https://www.janusec.com/articles/opensource/1582448725.html (转载请注明出处)


评论区(共0条评论)
Copyright ©2020 金汤智库(JANUSEC) All rights reserved.