Thứ Bảy, 31 tháng 3, 2018

JavaScript Deobfuscator and Unpacker

Công cụ này hiện đang được phát triển và chia sẻ trên Github.
Trang này đã không còn nhận được cập nhật và sửa lỗi. Vui lòng truy cập de4js để sử dụng phiên bản mới, tốt hơn.

Giải mã JavaScript

Hãy chọn kiểu mã hoá phù hợp!
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif; font-size: 14px; } .wrap { margin: 30px auto; width: 90%; } .title { font-size: 1.7em; font-weight: lighter; } .content { display: block; width: 100%; padding: 5px 16px; border: 1px solid #ddd; border-radius: 3px; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; } #input { background: #fff; } #output { display: none; } #view { background: #eee; white-space: pre-wrap; } .config { font-size: smaller; color: #595656; } .config input { margin-right: 4px; vertical-align: middle; } .config label { display: inline-block; margin: 0 7px; } .center { text-align: center; margin: 20px 0; } .actionbtn { padding: 4px 0; margin: 0 4px; display: inline-block; width: 30%; color: #595656; } .info { color: #d2e7f9; background: #2E9EFF; padding: 1em; } .info a { color: #fff; font-weight: bold; } (function() { function format() { var source = output.value; if (beautify.checked) source = js_beautify(source, { unescape_strings: true, jslint_happy: true }); if (highlight.checked) source = hljs.highlight('javascript', source).value; view[(highlight.checked ? 'innerHTML' : 'textContent')] = source || 'Hãy chọn kiểu mã hoá phù hợp!'; } function decode() { var source = input.value, packer = bvDecode.encode.value; if (source.trim() === '') return; view.textContent = 'Hãy chọn kiểu mã hoá phù hợp!'; output.value = ''; source = source.trim(); if (packer === 'evalencode') { try { var _source = source.replace('eval(', 'window.sourceEvalEncodeZz = ('); eval(_source); if (window.sourceEvalEncodeZz !== undefined) source = window.sourceEvalEncodeZz; } catch (err) {} } else if (packer === '_numberencode') { try { var patt = /_\d{4}\((_\d{4})\)\;\}/, _source = source; if (!patt.test(_source)) return; _source = _source.replace(/var\s/g, 'this.'); _source = _source.replace(/function\s(_\d{4})\(/, 'this.$1=function('); _source = _source.replace(patt, 'window.sourceNumberEncodeZz=$1;};'); _source = '(function(){' + _source + '})();'; eval(_source); source = window.sourceNumberEncodeZz; } catch (err) {} } else if (packer === 'arrayencode') { try { var pattsplit = /(?:[^\\])"];/, lastchar = ''; if (!pattsplit.test(source)) return; lastchar = source.match(pattsplit)[0].charAt(0); var _source = source.split(pattsplit), _var = _source[0] + lastchar + '"]', _name = _var.match(/var\s([\w\d]+)\s?=\s?\["/)[1], _code = _source[1], pattname = new RegExp('var\\s' + _name + '\\s?=\\s?\\["'), pattkey = new RegExp(_name + '\\[(\\d+)\\]', 'g'), escapable = /[\\\"\x00-\x1f\x7f-\uffff]/g, meta = { '\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '"': '\\"', '\\': '\\\\' }, quote = function(string) { escapable.lastIndex = 0; return escapable.test(string) ? string.replace(escapable, function(a) { var c = meta[a]; return typeof c === 'string' ? c : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); }) : string; }; _var = _var.replace(pattname, '["'); _var = eval(_var); _code.replace(pattkey, function(key, index) { _code = _code.replace(key, '"' + quote(_var[index]) + '"'); return _code; }); _source = _code.replace(/(\["([a-z\d\_]+)"\])/gi, '.$2'); source = _source; } catch (err) {} } else if (packer === 'urlencode' && Urlencoded.detect(source)) { source = Urlencoded.unpack(source); } else if (packer === 'p_a_c_k_e_r' && P_A_C_K_E_R.detect(source)) { source = P_A_C_K_E_R.unpack(source); } else if (packer === 'javascriptobfuscator' && JavascriptObfuscator.detect(source)) { source = JavascriptObfuscator.unpack(source); } else if (packer === 'myobfuscate' && MyObfuscate.detect(source)) { source = MyObfuscate.unpack(source); } output.value = source; format(); } function textreset() { if (copyjs.textContent === 'Sao chép vào Clipboard') return; copyjs.textContent = 'Sao chép vào Clipboard'; copyjs.removeAttribute('style'); } function timereset() { copytimeout = setTimeout(function() { textreset(); }, 3000); } var input = document.getElementById('input'), output = document.getElementById('output'), view = document.getElementById('view'), encode = document.getElementsByName('encode'), beautify = document.getElementById('beautify'), highlight = document.getElementById('highlight'), copyjs = document.getElementById('copyjs'), redecode = document.getElementById('redecode'), clear = document.getElementById('clear'), clipboard = new Clipboard('#copyjs'), copytimeout; input.oninput = decode; for (var i = 0; i < encode.length; i++) { encode[i].onchange = decode; } beautify.onchange = format; highlight.onchange = format; copyjs.onmouseout = function() { textreset(); clearTimeout(copytimeout); }; clipboard.on('success', function(e) { e.trigger.textContent = 'Đã chép vào Clipboard'; e.trigger.style.color = '#4caf50'; e.clearSelection(); timereset(); }); clipboard.on('error', function(e) { e.trigger.textContent = 'Lỗi! Trình duyệt không hỗ trợ.'; e.trigger.style.color = '#f44336'; timereset(); }); redecode.onclick = function() { input.value = output.value; decode(); } clear.onclick = function() { input.value = ''; output.value = ''; view.textContent = 'Hãy chọn kiểu mã hoá phù hợp!'; } })();

Thứ Sáu, 30 tháng 3, 2018

Thuộc tính text-transform

Định nghĩa và sử dụng

Thuộc tính text-transform thiết lập các ký tự viết hoa cho văn bản.

Cấu trúc

tag {
    text-transform: giá trị;
}
Với giá trị như sau:
Thuộc tínhgiá trịVí dụMô tả
text-transformnonetext-transform: none;Trả văn bản về dạng mặc định ban đầu.
capitalizetext-transform: capitalize;Chữ đầu tiên của mỗi thành phần là chữ hoa.
uppercasetext-transform: uppercase;Tất cả chữ trong văn bản thành chữ hoa.
lowercasetext-transform: lowercase;Tất cả chữ trong văn bản thành chữ thường.
inherittext-transform: inherit;Xác định thừa hưởng thuộc tính từ thành phần cha (thành phần bao ngoài).

Ví dụ

HTML viết:

<html>
<head></head>
<body>
<p class="capitalizeText">linh hồn huynh đệ</p>
<p class="uppercaseText">linh hồn huynh đệ</p>
<p class="lowercaseText">linh hồn huynh đệ</p>
</body>
</html>

Hiển thị trình duyệt khi chưa có CSS:

linh hồn huynh đệ
linh hồn huynh đệ
linh hồn huynh đệ

CSS viết:

p.capitalizeText {
    text-transform: capitalize;
}

p.uppercaseText {
    text-transform: uppercase;
}

p.lowercaseText {
    text-transform: lowercase;
}

Hiển thị trình duyệt khi có CSS:

Linh Hồn Huynh Đệ
LINH HỒN HUYNH ĐỆ
linh hồn huynh đệ

Trình duyệt hỗ trợ

  • Internet Explorer
  • Firefox
  • Opera
  • Google Chrome
  • Safari
Thuộc tính text-transform được hỗ trợ trong đa số các trình duyệt.
Giá trị "inherit" không hỗ trợ trình duyệt IE7 trở xuống, IE8 đòi hỏi phải có !Doctype

Thứ Năm, 29 tháng 3, 2018

Kiểm Tra & Tìm Mã Màu HTML

Bảng mã màu CSS HTML

Kiểm tra màu của mã

Với bảng mã màu Css - Html ở dưới dưới, bạn có thể lấy mã màu của từng màu bạn chọn cũng như kiểm tra màu của màu của Html code.
Điền mã màu bạn cần kiểm tra:
Lưu ý: Nếu mã màu không tồn tại, màu sẽ để mặc định FFFFFF
  • R
  • G
  • B
  • H °
  • S %
  • V %
#
Click vào nút bên để đưa mã màu vào danh sách dưới:

Danh sách mã màu bạn đã chọn ở bảng trên. Bạn có thể lưu màu ghi nhớ cho lần truy cập tới.