Skip to content

Commit

Permalink
full decode of encyption
Browse files Browse the repository at this point in the history
  • Loading branch information
justagoodman committed Apr 4, 2022
1 parent 9a79047 commit dbb5957
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 134 deletions.
2 changes: 1 addition & 1 deletion App/API/APIConstant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export enum API_ABILITY {
API_BLOG_INFO = 'https://www.asjmapihost.cc/blog',
}

export const BASE_CDN_URL = 'https://cdn-msp.18comic.art';
export const BASE_CDN_URL = 'https://cdn-msp.18comic.org';
export const BASE_CDN_YD_URL = 'https://yd.18comic.asia';

export const API_VERSION = '1.1.0';
10 changes: 7 additions & 3 deletions App/API/decoder.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
import encrypt_key from './encrypt_key';
import {
encodeKey
} from './encoder';

const CryptoJS = require('crypto-js');

import { magic } from './encoder';
import {
magic
} from './encoder';

export const salt = '18comicAPPContent';

export default function decode(encrypted) {
let data;
try {
let key = encrypt_key(magic + salt);
let key = encodeKey(magic + salt);
console.log(key);
let vector = CryptoJS.enc.Utf8.parse(key);
console.log(vector);
Expand Down
7 changes: 6 additions & 1 deletion App/API/encoder.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import encodeKey from './encrypt_key';
import {API_VERSION} from './APIConstant';
const CryptoJS = require('crypto-js');

export const magic = '1614446604';

Expand All @@ -13,6 +13,11 @@ export function randomMagic() {
return Math.floor(f.getTime() / 1e3);
}

export function encodeKey(key) {
console.log(CryptoJS.MD5(key).toString())
return CryptoJS.MD5(key).toString()
}

export default function getToken() {
const TokenParam = magic + ',' + version;
const token = encodeKey(magic + salt);
Expand Down
129 changes: 0 additions & 129 deletions App/API/encrypt_key.js

This file was deleted.

0 comments on commit dbb5957

Please sign in to comment.