MBUSTER Application Methods
Implementing Libraries for Macro Detection and Blocking
Application of java, js, png, jsp files required for operation on the WAS server.
The file list for MBUSTER integration is as follows:
- Mbuster.QF.jsp
- Mbuster.QC.jsp
- Mbuster_T.jsp
- MBusterAPI.java
- captcha.js
- fingerPrint.js
Explorer | Category | File Type | Description |
---|---|---|---|
WAS Server | Call | java | MBusterAPI.java |
WAS Server | Control | jsp | Mbuster_QC.jsp |
Mbuster_QF.jsp | |||
Mbuster_T.jsp | |||
WAS Server | Control | javascript | mbuster_meta.js |
mbuster_api.js | |||
captcha.js | |||
fingerPrint.js | |||
etc | etc | Other Files | Static files related to MBUSTER |
Integration Method
- Add MBUSTER integration files to the source code.
- Call the
MBusterAPI.callMBusterApiReject
function at the desired integration location. - Implement control based on the API communication result (macro detection result).
MBUSTER API Script Insertion and Call Example
- Related to MBUSTER
<script type="text/javascript" src="${pageContext.request.contextPath}/mbuster/resource/js/mbuster_meta.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/mbuster/resource/js/mbuster_api.js"></script>
- MBUSTER WEB Integration
MBUSTER_API({
clientIP : ClientIP,
user_login_id : user_login_id
});
Parameters when calling MBUSTER_API()
Required | Parameter | Description |
---|---|---|
Required | clientIp | Client IP |
user_login_id | User login ID (empty if not available) |
⚠️
It is not possible to call the API without passing the required parameters. The client's IP must be passed as an argument.
Modification of mbuster_meta.js file
const service_type = "http";
const macro_domain = "127.0.0.1"; // MBUSTER call domain
const macro_cookie_domain = '127.0.0.1'; // Domain for storing cookies (integration target site)
const macro_port = "8180";
const g_groupName = "www.stclab.com";
const mbuster_info_url = {
T : "./mbuster/Mbuster_T.jsp", // Block
QC : "./mbuster/Mbuster_QC.jsp", // Captcha
QF : "./mbuster/Mbuster_QF.jsp" // FingerPrint (Browser Challenge)
};
const mbmhIo = true;
Parameter | Description | Example |
---|---|---|
request | Client request HttpServerletRequest | HttpServerletRequest request |
response | Client HttpServerletResponse | HttpServerletResponse response |
groupName | MBUSTER registered domain group name | mbuster.io |
loginId | User login ID (client IP if not available) | user_id |
MBUSTER API Request
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
HttpSession session = request.getSession();
String groupName = "www.stclab.com";
String userId = (String) session.getAttribute("login_id");
// 1. Call API
String result = MBusterAPI.callMBusterApiReject(request, response, groupName, userId);
// 2. Control based on API result
String tmp[] = result.split(":");
if(tmp[0].equals("E")) {
return true;
}
else if (tmp[0].equals("F")) {
return true;
} else if (tmp[0].equals("T")) {
RequestDispatcher dispatcher = request.getRequestDispatcher("/mbuster/Mbuster_T.jsp");
dispatcher.forward(request, response);
return false;
} else if (tmp[0].equals("QC")) {
request.setAttribute("clientIp", tmp[1]);
request.setAttribute("loginId", tmp[2]);
request.setAttribute("groupName", tmp[3]);
RequestDispatcher dispatcher = request.getRequestDispatcher("/mbuster/Mbuster_QC.jsp");
dispatcher.forward(request, response);
return false;
} else if (tmp[0].equals("QF")) {
request.setAttribute("clientIp", tmp[1]);
request.setAttribute("loginId", tmp[2]);
request.setAttribute("groupName", tmp[3]);
RequestDispatcher dispatcher = request.getRequestDispatcher("/mbuster/Mbuster_QF.jsp");
dispatcher.forward(request, response);
return false;
}
return true;
}
Parameter | Description | Example |
---|---|---|
service_type | API service protocol (http / https) | http |
macro_domain | MBUSTER equipment URL (IP or domain) | mbuster.co.kr |
macro_cookie_domain | Domain for storing cookies (integration target site address) | www.stclab.com (opens in a new tab) |
macro_port | MBUSTER API service port (8180 default) | 8180 |
g_groupName | MBUSTER registered domain group name | www.stclab.com (opens in a new tab) |
MBUSTER API Request Return Results Parameter : result
Item | Result Value |
---|---|
User | "0" |
Communication Error | "E", "F" |
Block | "T" |
CAPTCHA | "QC" |
Browser Challenge | "QF" |
In case of communication error or user, call the original page, and control based on the flag in case of a macro. |