Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-web-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-web-master
Commits
1ddc3d1e
Commit
1ddc3d1e
authored
Feb 05, 2025
by
honghy
Committed by
wux
Feb 06, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug233短信注册受到攻击问题处理
parent
3bc995f2
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5416 additions
and
0 deletions
+5416
-0
jsencrypt-min.js
src/utils/jsencrypt-min.js
+5370
-0
jsencrypt.js
src/utils/jsencrypt.js
+22
-0
index.vue
src/views/registered/index.vue
+24
-0
No files found.
src/utils/jsencrypt-min.js
0 → 100644
View file @
1ddc3d1e
This diff is collapsed.
Click to expand it.
src/utils/jsencrypt.js
0 → 100644
View file @
1ddc3d1e
import
JSEncrypt
from
'
@/utils/jsencrypt-min
'
// 密钥对生成 http://web.chacuo.net/netrsakeypair
const
publicKey
=
'
MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAOE4LpDcF8WderHctum1zJQiy2TM+D5VWBEIxn9kvz9GL5A6ki8cWk0xacvN2Ros4pmHm573y7TJi8xv/YHplbsCAwEAAQ==
'
const
privateKey
=
'
MIIBVQIBADANBgkqhkiG9w0BAQEFAASCAT8wggE7AgEAAkEA4TgukNwXxZ16sdy26bXMlCLLZMz4PlVYEQjGf2S/P0YvkDqSLxxaTTFpy83ZGizimYebnvfLtMmLzG/9gemVuwIDAQABAkA7X3E/NRZ7PTnEO9hookmtX8LY7wQegqc1zmdt3CRizGJRB7/9LzDqvnOIvqqm+EoiZLjUUNKVkOom0FI2u32hAiEA8UtmegwiMaqmE4xrjqocLRAR0aVWV7i4fSTcSvLVCcsCIQDu8fvGY9wfVKEGgyfcJHuORowDAbYYXOulxC6sEW7l0QIgE1J2Yk+WbWO86NPVyRbWKsWep6sVvvCL1XmeKmJHrQECIQDGAEmVbTyDzdodjmNiXezwye7NswZVC/LNi1LtjQircQIhAIpF1rvPvxXkE7KvWTePrCWeU/+c6e1ylG7sPYumc1cx
'
// 加密
export
function
encrypt
(
txt
)
{
const
encryptor
=
new
JSEncrypt
()
encryptor
.
setPublicKey
(
publicKey
)
// 设置公钥
return
encryptor
.
encrypt
(
txt
)
// 对数据进行加密
}
// 解密
export
function
decrypt
(
txt
)
{
const
encryptor
=
new
JSEncrypt
()
encryptor
.
setPrivateKey
(
privateKey
)
// 设置私钥
return
encryptor
.
decrypt
(
txt
)
// 对数据进行解密
}
src/views/registered/index.vue
View file @
1ddc3d1e
...
...
@@ -286,6 +286,8 @@ import { getCode, reg, getCountryList, getInfo } from '@/api/user'
import
{
setToken
}
from
'
@/utils/auth
'
import
{
locale
}
from
'
@/api/country
'
import
{
langData
}
from
'
@/data/lang
'
import
{
encrypt
}
from
'
@/utils/jsencrypt
'
export
default
{
name
:
'
Registered
'
,
components
:
{},
...
...
@@ -396,6 +398,28 @@ export default {
isOrders
:
0
,
messageType
:
messageType
}
var
i
=
Math
.
floor
(
Math
.
random
()
*
(
3
-
1
+
1
))
+
1
const
specialChars
=
[
'
!
'
,
'
@
'
,
'
#
'
,
'
$
'
,
'
%
'
,
'
^
'
,
'
&
'
,
'
*
'
];
var
date
=
Date
.
now
();
// 生成随机索引
const
randomIndex
=
Math
.
floor
(
date
%
specialChars
.
length
);
// 选择特殊字符
const
specialChar
=
specialChars
[
randomIndex
];
var
p1
=
''
/*
1:手机号+节点+秘钥
2:手机号+国家号+秘钥
3:手机号+国家号+节点+秘钥
*/
if
(
i
==
1
)
{
p1
=
data
.
mobile
+
data
.
nodeValue
+
'
gzjd8888
'
+
specialChar
}
else
if
(
i
==
2
)
{
p1
=
data
.
mobile
+
data
.
areaCode
+
'
gzjd8888
'
+
specialChar
}
else
if
(
i
==
3
)
{
p1
=
data
.
mobile
+
data
.
areaCode
+
data
.
nodeValue
+
'
gzjd8888
'
+
specialChar
}
data
[
'
p1
'
]
=
encrypt
(
p1
)
data
[
'
p2
'
]
=
[
i
,
date
]
getCode
(
data
).
then
(()
=>
{
var
countDown
=
window
.
setInterval
(()
=>
{
if
(
this
.
count
<
1
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment