提交 1e5fcf45 authored 作者: 钟是志's avatar 钟是志

北电科加密修改

上级 54637ac0
...@@ -4,9 +4,10 @@ import { queryApiActionPath } from '@/webPublic/one_stop_public/utils/queryConfi ...@@ -4,9 +4,10 @@ import { queryApiActionPath } from '@/webPublic/one_stop_public/utils/queryConfi
import { qqCw } from '@/webPublic/one_stop_public/utils/request'; import { qqCw } from '@/webPublic/one_stop_public/utils/request';
import { isJSON } from '@/webPublic/zyd_public/utils/utils'; import { isJSON } from '@/webPublic/zyd_public/utils/utils';
import { deepCopy } from '@/webPublic/one_stop_public/utils/myutils'; import { deepCopy } from '@/webPublic/one_stop_public/utils/myutils';
import strToBinary from './strToBinary'; import strToBinary from './strToBinary'; // 字符串转二进制 混淆代码
import binaryToStr from './binaryToStr'; // 二进制字符串转JSON字符串 混淆代码
/** /**
* 字符串转二进制 增加代码混淆 * 字符串转二进制
* */ * */
// function strToBinary(str) { // function strToBinary(str) {
// let result = []; // let result = [];
...@@ -28,20 +29,20 @@ import strToBinary from './strToBinary'; ...@@ -28,20 +29,20 @@ import strToBinary from './strToBinary';
/** /**
* 二进制字符串转JSON字符串 * 二进制字符串转JSON字符串
* */ * */
function binaryToStr(binaryStr = '') { // function binaryToStr(binaryStr = '') {
let res = ''; // let res = '';
if (binaryStr) { // if (binaryStr) {
binaryStr = binaryStr.replaceAll('.', '1'); // binaryStr = binaryStr.replaceAll('.', '1');
binaryStr = binaryStr.replaceAll('-', '0'); // binaryStr = binaryStr.replaceAll('-', '0');
let strListArr = binaryStr.split('_'); // let strListArr = binaryStr.split('_');
//
for (let i = 0; i < strListArr.length; i++) { // for (let i = 0; i < strListArr.length; i++) {
let item = strListArr[i]; // let item = strListArr[i];
res += String.fromCharCode(parseInt(item, 2)); // res += String.fromCharCode(parseInt(item, 2));
} // }
} // }
return res; // return res;
} // }
function formatDatas(datas, url = '') { function formatDatas(datas, url = '') {
let datasCode = JSON.stringify(datas); let datasCode = JSON.stringify(datas);
...@@ -58,9 +59,9 @@ function formatDatas(datas, url = '') { ...@@ -58,9 +59,9 @@ function formatDatas(datas, url = '') {
}; };
if (openIsBinary) { if (openIsBinary) {
datasTrue.bin = true; datasTrue.bin = true;
if(window.CONFIG?.ALLBIN){ if (window.CONFIG?.ALL_R_BIN) {
datasTrue.rbin = true; datasTrue.rbin = true;
}else{ } else {
let findIndexA = resBinaryApiList.findIndex(g => { let findIndexA = resBinaryApiList.findIndex(g => {
return url.includes(g.api); return url.includes(g.api);
}); });
...@@ -85,7 +86,7 @@ export function giveFilePostData(datas, url) { ...@@ -85,7 +86,7 @@ export function giveFilePostData(datas, url) {
} }
if (url && typeof url === 'string') { if (url && typeof url === 'string') {
for (let item of encryptApiList) { for (let item of encryptApiList) {
if (url.indexOf(item.api) > -1 || Window.CONFIG?.ALLBIN) { if (window.CONFIG?.ALLBIN || url.indexOf(item.api) > -1) {
const roleGroup = getUserInfo().groupsId; const roleGroup = getUserInfo().groupsId;
if (url.indexOf('http') > -1) { if (url.indexOf('http') > -1) {
url = url.replace('/onestop/', `/onestop/safe/${roleGroup}/`); url = url.replace('/onestop/', `/onestop/safe/${roleGroup}/`);
...@@ -165,7 +166,7 @@ export function requestFileInfo(url, datas) { ...@@ -165,7 +166,7 @@ export function requestFileInfo(url, datas) {
return false; return false;
} }
if(window.location.origin.indexOf('localhost') > -1){ if (window.location.origin.indexOf('localhost') > -1) {
console.log({ console.log({
datas, datas,
url, url,
......
function _0x1fe1(_0xba4fa3, _0x1a5a2c) {
const _0x210c64 = _0x210c();
return _0x1fe1 = function (_0x1fe114, _0x38607b) {
_0x1fe114 = _0x1fe114 - 0x124;
let _0x638273 = _0x210c64[_0x1fe114];
return _0x638273;
}, _0x1fe1(_0xba4fa3, _0x1a5a2c);
}
(function (_0x10c1af, _0x545339) {
const _0x15b905 = _0x1fe1,
_0x316d2d = _0x10c1af();
while (!![]) {
try {
const _0x4e1d7b = -parseInt(_0x15b905(0x124)) / 0x1 + parseInt(_0x15b905(0x130)) / 0x2 + -parseInt(_0x15b905(0x12d)) / 0x3 * (parseInt(_0x15b905(0x12a)) / 0x4) + parseInt(_0x15b905(0x129)) / 0x5 * (parseInt(_0x15b905(0x128)) / 0x6) + parseInt(_0x15b905(0x12c)) / 0x7 * (parseInt(_0x15b905(0x127)) / 0x8) + -parseInt(_0x15b905(0x12f)) / 0x9 + parseInt(_0x15b905(0x12e)) / 0xa;
if (_0x4e1d7b === _0x545339) break; else _0x316d2d['push'](_0x316d2d['shift']());
} catch (_0x4e17c4) {
_0x316d2d['push'](_0x316d2d['shift']());
}
}
}(_0x210c, 0x4c89e));
function _0x210c() {
const _0xfdf36a = ['661315fARfsd', '4jTsGbX', 'split', '1154489jkyGqU', '1324143bPLxEM', '5021250iOAfBC', '4420215EKifMX', '537926uMCSQX', '86786XkjbYv', 'length', 'replaceAll', '8hyNtuX', '18ElZScC'];
_0x210c = function () {
return _0xfdf36a;
};
return _0x210c();
}
function binaryToStr(_0x3965d2 = '') {
const _0xe2d440 = _0x1fe1;
let _0x530667 = '';
if (_0x3965d2) {
_0x3965d2 = _0x3965d2[_0xe2d440(0x126)]('.', '1'), _0x3965d2 = _0x3965d2[_0xe2d440(0x126)]('-', '0');
let _0xcdde8f = _0x3965d2[_0xe2d440(0x12b)]('_');
for (let _0x6d2f3e = 0x0; _0x6d2f3e < _0xcdde8f[_0xe2d440(0x125)]; _0x6d2f3e++) {
let _0x2c7a33 = _0xcdde8f[_0x6d2f3e];
_0x530667 += String['fromCharCode'](parseInt(_0x2c7a33, 0x2));
}
}
return _0x530667;
}
export default binaryToStr;
/**
* 代码混淆
* 2022年6月21日
* 钟是志
* 解决北电科学校的 第三方安全测评公司的问题
* */
function _0x4ef8() { function _0x4ef8() {
const _0x17bb5a = ['481374jxbvau', 'push', '28wsNjbv', '5xIHGnt', 'charCodeAt', '1024904tHoNdW', '11191763OpoFLZ', '624243CCgrxw', '2isqBwU', '1394360vTUesG', '387gETRxx', '96020VVIGLY', '367205YUbBcj']; const _0x17bb5a = ['481374jxbvau', 'push', '28wsNjbv', '5xIHGnt', 'charCodeAt', '1024904tHoNdW', '11191763OpoFLZ', '624243CCgrxw', '2isqBwU', '1394360vTUesG', '387gETRxx', '96020VVIGLY', '367205YUbBcj'];
_0x4ef8 = function () { _0x4ef8 = function () {
......
...@@ -129,7 +129,6 @@ const getUrl = url => (url.startsWith('/') ? url : '/' + url); ...@@ -129,7 +129,6 @@ const getUrl = url => (url.startsWith('/') ? url : '/' + url);
export const request = (url, data, options = {}) => { export const request = (url, data, options = {}) => {
return giveBase16EnCode(data, url) return giveBase16EnCode(data, url)
.then((newData) => { .then((newData) => {
if(typeof newData === 'object' && newData.url && newData.datas){ if(typeof newData === 'object' && newData.url && newData.datas){
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论