Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-images-generator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
ygopro-images-generator
Commits
c96e4c4e
Commit
c96e4c4e
authored
Mar 29, 2016
by
Peter Xin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adjustment
parent
25cfc5d9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
7 deletions
+44
-7
.gitignore
.gitignore
+1
-2
Authorize.rb
Authorize.rb
+38
-0
Test.rb
Test.rb
+5
-2
WineFont.reg
WineFont.reg
+0
-3
No files found.
.gitignore
View file @
c96e4c4e
...
@@ -4,5 +4,4 @@ MagicSetEditor
...
@@ -4,5 +4,4 @@ MagicSetEditor
ygopro-images/*
ygopro-images/*
ygopro-images-raw/*.jpg
ygopro-images-raw/*.jpg
*.mse-set
*.mse-set
*.log
*.log
Authorize.rb
\ No newline at end of file
\ No newline at end of file
Authorize.rb
0 → 100644
View file @
c96e4c4e
# Check the command is legal or not
require
'json'
require
'digest/md5'
require
File
.
dirname
(
__FILE__
)
+
"/Log.rb"
module
Authorize
module_function
@@command_password
=
"7c7cc75c2822cb592e7783d9b92825ac"
def
md5
(
source
)
Digest
::
MD5
.
hexdigest
source
end
def
md5_file
(
source
)
begin
content
=
File
.
open
(
source
)
{
|
f
|
f
.
read
}
self
.
md5
content
rescue
Exception
=>
e
Log
.
logger
.
error
e
.
inspect
nil
end
end
def
get_command
(
text
)
begin
json
=
JSON
.
parse
text
return
401
if
json
[
'password'
].
nil?
pw
=
Authorize
.
md5
(
'password'
)
return
403
if
@@command_password
!=
pw
return
json
[
'content'
]
rescue
Exception
=>
e
return
400
end
end
def
change_password
(
password
)
@@command_password
=
Aunthorize
.
md5
(
password
)
end
end
\ No newline at end of file
Test.rb
View file @
c96e4c4e
...
@@ -8,10 +8,12 @@ def unit_test1
...
@@ -8,10 +8,12 @@ def unit_test1
end
end
def
unit_test2
def
unit_test2
# remember to delete files under mse-sets\ first.
# That will be added later
require
'./Sqlite.rb'
require
'./Sqlite.rb'
Global
.
language
=
'
cn
'
Global
.
language
=
'
jp
'
data
=
Sqlite
.
split
Sqlite
.
load
data
=
Sqlite
.
split
Sqlite
.
load
data
=
[
data
[
1
0
]]
data
=
[
data
[
1
2
]]
require
'./MSETranslator.rb'
require
'./MSETranslator.rb'
MSETranslator
.
generate_mse_all
(
data
)
MSETranslator
.
generate_mse_all
(
data
)
end
end
...
@@ -21,4 +23,5 @@ def unit_test3
...
@@ -21,4 +23,5 @@ def unit_test3
MSETranslator
.
export_mse_all
MSETranslator
.
export_mse_all
end
end
unit_test2
unit_test3
unit_test3
\ No newline at end of file
WineFont.reg
deleted
100644 → 0
View file @
25cfc5d9
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
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