更换基础镜像

This commit is contained in:
Cheney 2024-03-07 11:32:45 +08:00
parent 191472d0d8
commit 9dac075967
16 changed files with 1277 additions and 376 deletions

View File

@ -1,4 +1,4 @@
FROM registry.cn-hangzhou.aliyuncs.com/fullstack/nginx
FROM nginx
MAINTAINER cheney
ADD www /app
ADD default.conf /etc/nginx/conf.d

View File

@ -48,3 +48,5 @@ https://github.com/gohugoio/hugo/releases
`hugo server`
## 发布
build.cmd
push.cmd

View File

@ -1,5 +1,5 @@
server {
listen 80;
listen 8080;
location / {
root /app;
}

BIN
fullstack.web.tar Normal file

Binary file not shown.

View File

@ -45,18 +45,18 @@
url: https://c.runoob.com/front-end/6318/
logo: isux.png
description: ASCII 码表
# - title: 无线支付密码器
# url: /swa/window.html?to=%2Fswa%2Fcpe%2Findex.html
# logo: svgomg.png
# description: 无线支付密码器
# - title: UKey 发行器
# url: /swa/window.html?to=%2Fswa%2Fu%2Findex.html
# logo: u.png
# description: 渔翁 UKey 发行器
# - title: IC 卡发行器
# url: /swa/window.html?to=%2Fswa%2Fic%2Findex.html
# logo: ic.png
# description: 信雅达 IC 卡发行器
- title: 无线支付密码器
url: /swa/window.html?to=%2Fswa%2Fcpe%2Findex.html
logo: svgomg.png
description: 无线支付密码器
- title: UKey 发行器
url: /swa/window.html?to=%2Fswa%2Fu%2Findex.html
logo: u.png
description: 渔翁 UKey 发行器
- title: IC 卡发行器
url: /swa/window.html?to=%2Fswa%2Fic%2Findex.html
logo: ic.png
description: 信雅达 IC 卡发行器
- title: JS Playground
url: https://jsfiddle.net/
logo: uikitme.png
@ -96,361 +96,368 @@
url: https://cn.vitejs.dev/
description: 下一代的前端工具链
- term: 图标
- term: 开源
links:
- title: Iconfinder
logo: Iconfinder.png
url: https://www.iconfinder.com
description: 2,100,000+ free and premium vector icons.
- title: iconfont
logo: iconfont.png
url: http://www.iconfont.cn/
description: 阿里巴巴矢量图标库。
- title: iconmonstr
logo: iconmonstr.png
url: https://iconmonstr.com/
description: Free simple icons for your next project.
- title: Icon Archive
logo: iconarchive.png
url: http://www.iconarchive.com/
description: Search 590,912 free icons.
- title: FindIcons
logo: FindIcons.png
url: https://findicons.com/
description: Search through 300,000 free icons.
- title: IcoMoonApp
logo: IcoMoonApp.png
url: https://icomoon.io/app/
description: Icon Font, SVG, PDF & PNG Generator.
- title: easyicon
logo: easyicon.png
url: http://www.easyicon.net/
description: PNG、ICO、ICNS格式图标搜索、图标下载服务。
- title: flaticon
logo: flaticon.png
url: https://www.flaticon.com/
description: 634,000+ Free vector icons in SVG, PSD, PNG, EPS format or as ICON FONT.
- title: UICloud
logo: UICloud.png
url: http://ui-cloud.com/
description: The largest user interface design database in the world.
- title: Material icons
logo: Materialicons.png
url: https://material.io/icons/
description: Access over 900 material system icons, available in a variety of sizes and densities, and as a web font.
- title: Font Awesome Icon
logo: fontawesomeicon.png
url: https://fontawesome.com/icons/
description: The complete set of 675 icons in Font Awesome.
- title: ion icons
logo: ionicons.png
url: http://ionicons.com/
description: The premium icon font for Ionic Framework.
- title: Simpleline Icons
logo: simplelineicons.png
url: http://simplelineicons.com/
description: Simple line Icons pack.
- title: Iconsfeed
logo: iconsfeed.png
url: http://www.iconsfeed.com/
description: iOS icons gallery.
- title: iOS Icon Gallery
logo: iosicongallery.png
url: http://iosicongallery.com/
description: Showcasing beautiful icon designs from the iOS App Store.
- title: World Vector Logo
logo: worldvectorlogo.png
url: https://worldvectorlogo.com/
description: Brand logos free to download.
- title: Instant Logo Search
logo: InstantLogoSearch.png
url: http://instantlogosearch.com/
description: Search & download thousands of logos instantly.
- title: Kit
logo: anyway.png
url: http://kit.fullstack.club
description: 手边的命令行脚本工具。
- term: 图片处理
links:
- title: freepik
logo: freepik.png
url: https://www.freepik.com/
description: More than a million free vectors, PSD, photos and free icons.
- title: wallhalla
logo: wallhalla.png
url: https://wallhalla.com/
description: Find awesome high quality wallpapers for desktop and mobile in one place.
- title: 365PSD
logo: 365PSD.png
url: https://365psd.com/
description: Free PSD & Graphics, Illustrations.
- title: Medialoot
logo: Medialoot.png
url: https://medialoot.com/
description: Free & Premium Design Resources — Medialoot.
- title: 千图网
logo: qiantu.png
url: http://www.58pic.com/
description: 专注免费设计素材下载的网站.
- title: 千库网
logo: qianku.png
url: http://588ku.com/
description: 免费 png 图片背景素材下载。
- title: 我图网
logo: wotu.png
url: http://www.ooopic.com/
description: 我图网,提供图片素材及模板下载,专注正版设计作品交易。
- title: 90 设计
logo: 90sheji.png
url: http://90sheji.com/
description: 电商设计(淘宝美工)千图免费淘宝素材库。
- title: 昵图网
logo: nipic.png
url: http://www.nipic.com/
description: 原创素材共享平台。
- title: 懒人图库
logo: lanrentuku.png
url: http://www.lanrentuku.com/
description: 懒人图库专注于提供网页素材下载。
- title: 素材搜索
logo: sousucai.png
url: http://so.ui001.com/
description: 设计素材搜索聚合。
- title: PS 饭团网
logo: psefan.png
url: http://psefan.com/
description: 不一样的设计素材库!让自己的设计与众不同!
- title: 素材中国
logo: sccnn.png
url: http://www.sccnn.com/
description: 免费素材共享平台。
- title: goqr
url: http://goqr.me/
logo: goqr.png
description: create QR codes for free (Logo, T-Shirt, vCard, EPS).
- title: ezgif
url: https://ezgif.com
logo: ezgif.png
description: simple online GIF maker and toolset for basic animated GIF editing.
- title: screen sizes
url: http://screensiz.es/
logo: screensizes.png
description: Viewport Sizes and Pixel Densities for Popular Devices.
- title: svgomg
url: https://jakearchibald.github.io/svgomg/
logo: svgomg.png
description: SVG 在线压缩平台。
- title: 稿定抠图
url: https://koutu.gaoding.com/
logo: gaoding.png
description: 免费在线抠图软件,图片快速换背景-抠白底图。
- term: 字体资源
links:
- title: Google Font
url: https://fonts.google.com/
logo: googlefont.png
description: Making the web more beautiful, fast, and open through great typography.
- title: Typekit
url: https://typekit.com/
logo: typekit.png
description: Quality fonts from the worlds best foundries.
- title: 方正字库
url: http://www.foundertype.com/
logo: Fondertype.png
description: 方正字库官方网站。
- title: 字体传奇网
url: http://ziticq.com/
logo: ziticq.png
description: 中国首个字体品牌设计师交流网。
- title: 私藏字体
url: http://sicangziti.com/
logo: sicangziti.png
description: 优质字体免费下载站。
- title: Fontsquirrel
url: https://www.fontsquirrel.com/
logo: fontsquirrel.png
description: FREE fonts for graphic designers.
- title: Urban Fonts
url: https://www.urbanfonts.com/
logo: UrbanFonts.png
description: Download Free Fonts and Free Dingbats.
- title: Lost Type
url: http://www.losttype.com/
logo: losttype.png
description: Lost Type is a Collaborative Digital Type Foundry.
- title: FONTS2U
url: https://fonts2u.com/
logo: fonts2u.png
description: Download free fonts for Windows and Macintosh.
- title: Fontex
url: http://www.fontex.org/
logo: fontex.png
description: Free Fonts to Download + Premium Typefaces.
- title: FontM
url: http://fontm.com/
logo: FontM.png
description: Free Fonts
- title: My Fonts
url: http://www.myfonts.com/
logo: MyFonts.png
description: Fonts for Print, Products & Screens.
- title: Da Font
url: https://www.dafont.com/
logo: dafont.png
description: Archive of freely downloadable fonts.
- title: OnlineWebFonts
url: https://www.onlinewebfonts.com/
logo: OnlineWebFonts.png
description: WEB Free Fonts for Windows and Mac / Font free Download.
- title: Abstract Fonts
url: http://www.abstractfonts.com/
logo: abstractfonts.png
description: Abstract Fonts (13,866 free fonts).
- term: PPT资源
links:
- title: OfficePLUS
url: http://www.officeplus.cn/Template/Home.shtml
logo: officeplus.png
description: OfficePLUS微软Office官方在线模板网站
- title: 优品PPT
url: http://www.ypppt.com/
logo: ypppt.png
description: 高质量的模版而且还有PPT图表PPT背景图等资源。
- title: PPT+
url: http://www.pptplus.cn/
logo: pptplus.png
description: PPT加直播、录制和分享—PPT+语音内容分享平台。
- title: PPTMind
url: http://www.pptmind.com/
logo: pptmind.png
description: 分享高端 ppt 模板与 keynote 模板的数字作品交易平台。
- title: tretars
url: http://www.tretars.com/ppt-templates
logo: tretars.png
description: The best free Mockups from the Web.
- title: 5百丁
url: http://ppt.500d.me/
logo: 500d.png
description: 中国领先的PPT模板共享平台。
- taxonomy: 开发设计
icon: fas fa-tools fa-lg
list:
- term: 图形创意
links:
- title: photoshop
url: https://www.adobe.com/cn/products/photoshop.html
logo: photoshop.png
description: Photoshop不需要解释
- title: Affinity Designer
url: https://affinity.serif.com/
logo: AffinityDesigner.png
description: 专业创意软件
- title: Illustrator
url: https://www.adobe.com/cn/products/illustrator/
logo: Illustrator.png
description: 矢量图形和插图。
- title: indesign
url: http://www.adobe.com/cn/products/indesign.html
logo: INDESIGN .png
description: 页面设计、布局和出版。
- title: cinema-4d
url: https://www.maxon.net/en/products/cinema-4d/overview/
logo: cinema4d.png
description: Cinema 4D is the perfect package for all 3D artists who want to achieve breathtaking results fast and hassle-free.
- title: 3ds-max
url: https://www.autodesk.com/products/3ds-max/overview
logo: 3dsmax.png
description: 3D modeling, animation, and rendering software
- title: Blender
url: https://www.blender.org/
logo: blender.png
description: Blender is the free and open source 3D creation suite.
- term: 界面设计
links:
- title: Sketch
url: https://sketchapp.com/
logo: sketchapp.png
description: The digital design toolkit
- title: Adobe XD
url: http://www.adobe.com/products/xd.html
logo: ADOBEXDCC.png
description: Introducing Adobe XD. Design. Prototype. Experience.
- title: invisionapp
url: https://www.invisionapp.com/
logo: invisionapp.png
description: Powerful design prototyping tools
- title: marvelapp
url: https://marvelapp.com/
logo: marvelapp.png
description: Simple design, prototyping and collaboration
- title: Muse CC
url: https://creative.adobe.com/zh-cn/products/download/muse
logo: MuseCC.png
description: 无需利用编码即可进行网站设计。
- title: figma
url: https://www.figma.com/
logo: figma.png
description: Design, prototype, and gather feedback all in one place with Figma.
- term: 在线配色
links:
- title: khroma
url: http://khroma.co/generator/
logo: khroma.png
description: Khroma is the fastest way to discover, search, and save color combos you'll want to use.
- title: uigradients
url: https://uigradients.com
logo: uigradients.png
description: Beautiful colored gradients.
- title: gradients
url: http://gradients.io/
logo: gradients.png
description: Curated gradients for designers and developers.
- title: Coolest
url: https://webkul.github.io/coolhue/
logo: Coolest.png
description: Coolest handpicked Gradient Hues for your next super ⚡ amazing stuff.
- title: webgradients
url: https://webgradients.com/
logo: webgradients.png
description: WebGradients is a free collection of 180 linear gradients that you can use as content backdrops in any part of your website.
- title: grabient
url: https://www.grabient.com/
logo: grabient.png
description: 2017 Grabient by unfold.
- title: thedayscolor
url: http://www.thedayscolor.com/
logo: thedayscolor.png
description: The daily color digest
- title: flatuicolors
url: http://flatuicolors.com/
logo: flatuicolors.png
description: Copy Paste Color Pallette from Flat UI Theme.
- title: coolors
url: https://coolors.co/
logo: coolors.png
description: The super fast color schemes generator!
- title: colorhunt
url: http://www.colorhunt.co/
logo: colorhunt.png
description: Beautiful Color Palettes.
- title: Adobe Color CC
url: https://color.adobe.com/zh/create/color-wheel
logo: AdobeColorCC.png
description: Create color schemes with the color wheel or browse thousands of color combinations from the Color community.
- title: flatuicolorpicker
url: http://www.flatuicolorpicker.com/
logo: flatuicolorpicker.png
description: Best Flat Colors For UI Design.
- title: trianglify
url: http://qrohlf.com/trianglify-generator/
logo: trianglify.png
description: Trianglify Generator.
- title: klart
url: https://klart.co/colors/
logo: klart.png
description: Beautiful colors and designs to your inbox every week.
- title: vanschneider
url: http://www.vanschneider.com/colors
logo: vanschneider.png
description: Color Claim was created in 2012 by Tobias van Schneider with the goal to collect & combine unique colors for my future projects.
# - term: 图标
# links:
# - title: Iconfinder
# logo: Iconfinder.png
# url: https://www.iconfinder.com
# description: 2,100,000+ free and premium vector icons.
# - title: iconfont
# logo: iconfont.png
# url: http://www.iconfont.cn/
# description: 阿里巴巴矢量图标库。
# - title: iconmonstr
# logo: iconmonstr.png
# url: https://iconmonstr.com/
# description: Free simple icons for your next project.
# - title: Icon Archive
# logo: iconarchive.png
# url: http://www.iconarchive.com/
# description: Search 590,912 free icons.
# - title: FindIcons
# logo: FindIcons.png
# url: https://findicons.com/
# description: Search through 300,000 free icons.
# - title: IcoMoonApp
# logo: IcoMoonApp.png
# url: https://icomoon.io/app/
# description: Icon Font, SVG, PDF & PNG Generator.
# - title: easyicon
# logo: easyicon.png
# url: http://www.easyicon.net/
# description: PNG、ICO、ICNS格式图标搜索、图标下载服务。
# - title: flaticon
# logo: flaticon.png
# url: https://www.flaticon.com/
# description: 634,000+ Free vector icons in SVG, PSD, PNG, EPS format or as ICON FONT.
# - title: UICloud
# logo: UICloud.png
# url: http://ui-cloud.com/
# description: The largest user interface design database in the world.
# - title: Material icons
# logo: Materialicons.png
# url: https://material.io/icons/
# description: Access over 900 material system icons, available in a variety of sizes and densities, and as a web font.
# - title: Font Awesome Icon
# logo: fontawesomeicon.png
# url: https://fontawesome.com/icons/
# description: The complete set of 675 icons in Font Awesome.
# - title: ion icons
# logo: ionicons.png
# url: http://ionicons.com/
# description: The premium icon font for Ionic Framework.
# - title: Simpleline Icons
# logo: simplelineicons.png
# url: http://simplelineicons.com/
# description: Simple line Icons pack.
# - title: Iconsfeed
# logo: iconsfeed.png
# url: http://www.iconsfeed.com/
# description: iOS icons gallery.
# - title: iOS Icon Gallery
# logo: iosicongallery.png
# url: http://iosicongallery.com/
# description: Showcasing beautiful icon designs from the iOS App Store.
# - title: World Vector Logo
# logo: worldvectorlogo.png
# url: https://worldvectorlogo.com/
# description: Brand logos free to download.
# - title: Instant Logo Search
# logo: InstantLogoSearch.png
# url: http://instantlogosearch.com/
# description: Search & download thousands of logos instantly.
#
# - term: 图片处理
# links:
# - title: freepik
# logo: freepik.png
# url: https://www.freepik.com/
# description: More than a million free vectors, PSD, photos and free icons.
# - title: wallhalla
# logo: wallhalla.png
# url: https://wallhalla.com/
# description: Find awesome high quality wallpapers for desktop and mobile in one place.
# - title: 365PSD
# logo: 365PSD.png
# url: https://365psd.com/
# description: Free PSD & Graphics, Illustrations.
# - title: Medialoot
# logo: Medialoot.png
# url: https://medialoot.com/
# description: Free & Premium Design Resources — Medialoot.
# - title: 千图网
# logo: qiantu.png
# url: http://www.58pic.com/
# description: 专注免费设计素材下载的网站.
# - title: 千库网
# logo: qianku.png
# url: http://588ku.com/
# description: 免费 png 图片背景素材下载。
# - title: 我图网
# logo: wotu.png
# url: http://www.ooopic.com/
# description: 我图网,提供图片素材及模板下载,专注正版设计作品交易。
# - title: 90 设计
# logo: 90sheji.png
# url: http://90sheji.com/
# description: 电商设计(淘宝美工)千图免费淘宝素材库。
# - title: 昵图网
# logo: nipic.png
# url: http://www.nipic.com/
# description: 原创素材共享平台。
# - title: 懒人图库
# logo: lanrentuku.png
# url: http://www.lanrentuku.com/
# description: 懒人图库专注于提供网页素材下载。
# - title: 素材搜索
# logo: sousucai.png
# url: http://so.ui001.com/
# description: 设计素材搜索聚合。
# - title: PS 饭团网
# logo: psefan.png
# url: http://psefan.com/
# description: 不一样的设计素材库!让自己的设计与众不同!
# - title: 素材中国
# logo: sccnn.png
# url: http://www.sccnn.com/
# description: 免费素材共享平台。
# - title: goqr
# url: http://goqr.me/
# logo: goqr.png
# description: create QR codes for free (Logo, T-Shirt, vCard, EPS).
# - title: ezgif
# url: https://ezgif.com
# logo: ezgif.png
# description: simple online GIF maker and toolset for basic animated GIF editing.
# - title: screen sizes
# url: http://screensiz.es/
# logo: screensizes.png
# description: Viewport Sizes and Pixel Densities for Popular Devices.
# - title: svgomg
# url: https://jakearchibald.github.io/svgomg/
# logo: svgomg.png
# description: SVG 在线压缩平台。
# - title: 稿定抠图
# url: https://koutu.gaoding.com/
# logo: gaoding.png
# description: 免费在线抠图软件,图片快速换背景-抠白底图。
#
# - term: 字体资源
# links:
# - title: Google Font
# url: https://fonts.google.com/
# logo: googlefont.png
# description: Making the web more beautiful, fast, and open through great typography.
# - title: Typekit
# url: https://typekit.com/
# logo: typekit.png
# description: Quality fonts from the worlds best foundries.
# - title: 方正字库
# url: http://www.foundertype.com/
# logo: Fondertype.png
# description: 方正字库官方网站。
# - title: 字体传奇网
# url: http://ziticq.com/
# logo: ziticq.png
# description: 中国首个字体品牌设计师交流网。
# - title: 私藏字体
# url: http://sicangziti.com/
# logo: sicangziti.png
# description: 优质字体免费下载站。
# - title: Fontsquirrel
# url: https://www.fontsquirrel.com/
# logo: fontsquirrel.png
# description: FREE fonts for graphic designers.
# - title: Urban Fonts
# url: https://www.urbanfonts.com/
# logo: UrbanFonts.png
# description: Download Free Fonts and Free Dingbats.
# - title: Lost Type
# url: http://www.losttype.com/
# logo: losttype.png
# description: Lost Type is a Collaborative Digital Type Foundry.
# - title: FONTS2U
# url: https://fonts2u.com/
# logo: fonts2u.png
# description: Download free fonts for Windows and Macintosh.
# - title: Fontex
# url: http://www.fontex.org/
# logo: fontex.png
# description: Free Fonts to Download + Premium Typefaces.
# - title: FontM
# url: http://fontm.com/
# logo: FontM.png
# description: Free Fonts
# - title: My Fonts
# url: http://www.myfonts.com/
# logo: MyFonts.png
# description: Fonts for Print, Products & Screens.
# - title: Da Font
# url: https://www.dafont.com/
# logo: dafont.png
# description: Archive of freely downloadable fonts.
# - title: OnlineWebFonts
# url: https://www.onlinewebfonts.com/
# logo: OnlineWebFonts.png
# description: WEB Free Fonts for Windows and Mac / Font free Download.
# - title: Abstract Fonts
# url: http://www.abstractfonts.com/
# logo: abstractfonts.png
# description: Abstract Fonts (13,866 free fonts).
#
# - term: PPT资源
# links:
# - title: OfficePLUS
# url: http://www.officeplus.cn/Template/Home.shtml
# logo: officeplus.png
# description: OfficePLUS微软Office官方在线模板网站
# - title: 优品PPT
# url: http://www.ypppt.com/
# logo: ypppt.png
# description: 高质量的模版而且还有PPT图表PPT背景图等资源。
# - title: PPT+
# url: http://www.pptplus.cn/
# logo: pptplus.png
# description: PPT加直播、录制和分享—PPT+语音内容分享平台。
# - title: PPTMind
# url: http://www.pptmind.com/
# logo: pptmind.png
# description: 分享高端 ppt 模板与 keynote 模板的数字作品交易平台。
# - title: tretars
# url: http://www.tretars.com/ppt-templates
# logo: tretars.png
# description: The best free Mockups from the Web.
# - title: 5百丁
# url: http://ppt.500d.me/
# logo: 500d.png
# description: 中国领先的PPT模板共享平台。
#
#
#- taxonomy: 开发设计
# icon: fas fa-tools fa-lg
# list:
# - term: 图形创意
# links:
# - title: photoshop
# url: https://www.adobe.com/cn/products/photoshop.html
# logo: photoshop.png
# description: Photoshop不需要解释
# - title: Affinity Designer
# url: https://affinity.serif.com/
# logo: AffinityDesigner.png
# description: 专业创意软件
# - title: Illustrator
# url: https://www.adobe.com/cn/products/illustrator/
# logo: Illustrator.png
# description: 矢量图形和插图。
# - title: indesign
# url: http://www.adobe.com/cn/products/indesign.html
# logo: INDESIGN .png
# description: 页面设计、布局和出版。
# - title: cinema-4d
# url: https://www.maxon.net/en/products/cinema-4d/overview/
# logo: cinema4d.png
# description: Cinema 4D is the perfect package for all 3D artists who want to achieve breathtaking results fast and hassle-free.
# - title: 3ds-max
# url: https://www.autodesk.com/products/3ds-max/overview
# logo: 3dsmax.png
# description: 3D modeling, animation, and rendering software
# - title: Blender
# url: https://www.blender.org/
# logo: blender.png
# description: Blender is the free and open source 3D creation suite.
# - term: 界面设计
# links:
# - title: Sketch
# url: https://sketchapp.com/
# logo: sketchapp.png
# description: The digital design toolkit
# - title: Adobe XD
# url: http://www.adobe.com/products/xd.html
# logo: ADOBEXDCC.png
# description: Introducing Adobe XD. Design. Prototype. Experience.
# - title: invisionapp
# url: https://www.invisionapp.com/
# logo: invisionapp.png
# description: Powerful design prototyping tools
# - title: marvelapp
# url: https://marvelapp.com/
# logo: marvelapp.png
# description: Simple design, prototyping and collaboration
# - title: Muse CC
# url: https://creative.adobe.com/zh-cn/products/download/muse
# logo: MuseCC.png
# description: 无需利用编码即可进行网站设计。
# - title: figma
# url: https://www.figma.com/
# logo: figma.png
# description: Design, prototype, and gather feedback all in one place with Figma.
# - term: 在线配色
# links:
# - title: khroma
# url: http://khroma.co/generator/
# logo: khroma.png
# description: Khroma is the fastest way to discover, search, and save color combos you'll want to use.
# - title: uigradients
# url: https://uigradients.com
# logo: uigradients.png
# description: Beautiful colored gradients.
# - title: gradients
# url: http://gradients.io/
# logo: gradients.png
# description: Curated gradients for designers and developers.
# - title: Coolest
# url: https://webkul.github.io/coolhue/
# logo: Coolest.png
# description: Coolest handpicked Gradient Hues for your next super ⚡ amazing stuff.
# - title: webgradients
# url: https://webgradients.com/
# logo: webgradients.png
# description: WebGradients is a free collection of 180 linear gradients that you can use as content backdrops in any part of your website.
# - title: grabient
# url: https://www.grabient.com/
# logo: grabient.png
# description: 2017 Grabient by unfold.
# - title: thedayscolor
# url: http://www.thedayscolor.com/
# logo: thedayscolor.png
# description: The daily color digest
# - title: flatuicolors
# url: http://flatuicolors.com/
# logo: flatuicolors.png
# description: Copy Paste Color Pallette from Flat UI Theme.
# - title: coolors
# url: https://coolors.co/
# logo: coolors.png
# description: The super fast color schemes generator!
# - title: colorhunt
# url: http://www.colorhunt.co/
# logo: colorhunt.png
# description: Beautiful Color Palettes.
# - title: Adobe Color CC
# url: https://color.adobe.com/zh/create/color-wheel
# logo: AdobeColorCC.png
# description: Create color schemes with the color wheel or browse thousands of color combinations from the Color community.
# - title: flatuicolorpicker
# url: http://www.flatuicolorpicker.com/
# logo: flatuicolorpicker.png
# description: Best Flat Colors For UI Design.
# - title: trianglify
# url: http://qrohlf.com/trianglify-generator/
# logo: trianglify.png
# description: Trianglify Generator.
# - title: klart
# url: https://klart.co/colors/
# logo: klart.png
# description: Beautiful colors and designs to your inbox every week.
# - title: vanschneider
# url: http://www.vanschneider.com/colors
# logo: vanschneider.png
# description: Color Claim was created in 2012 by Tobias van Schneider with the goal to collect & combine unique colors for my future projects.

View File

@ -80,4 +80,4 @@ $(function (){
</script>
</body>
</html>
</html>

143
swa/beast/index.html Normal file
View File

@ -0,0 +1,143 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>格式转换</title>
<style>
body {
text-align: center;
margin-top: 100px;
}
.io {
width: 80%;
display: inline-block;
height : 5rem
}
.turn {
margin: 2rem;
}
button-group {
display: inline-block;
margin: 0 0.5rem;
/*width: 1rem;*/
}
button-group button {
display: block;
}
</style>
</head>
<body>
<h3>输入</h3>
<textarea id="in" class="io"></textarea>
<div class="turn">
<button-group>
<button id="turnio" style="margin-right: 5rem; ">交换输入输出</button>
<button id="clearo" style="margin-right: 5rem; ">&emsp;清空输出&emsp;</button>
<button id="clear" style="margin-right: 5rem; ">&emsp;清空所有&emsp;</button>
</button-group>
<button-group>
<button id="utf8Tobase64">UTF8 转 base64</button>
<br>
<button id="base64ToUtf8">base64 转 UTF8</button>
</button-group>
<button-group>
<button id="base64ToHex">base64 转 Hex</button>
<br>
<button id="hexToBase64">Hex 转 base64</button>
</button-group>
<button-group>
<button id="utf8ToHex">UTF8 转 Hex</button>
<br>
<button id="hexToUtf8">Hex 转 UTF8</button>
</button-group>
</div>
<h3>输出</h3>
<textarea id="out" class="io"></textarea>
<!--<script type="application/javascript" src="base64.js"></script>-->
<script type="application/javascript" src="tool.js"></script>
<script type="text/javascript" src="./jquery.min.js"></script>
<script type="application/javascript">
$(function () {
$("#turnio").click(function () {
var inText = $("#in").val();
var outText = $("#out").val();
$("#in").val( outText );
$("#out").val( inText );
})
$("#cleari").click(function () {
$("#in").val("");
})
$("#clearo").click(function () {
$("#out").val("");
})
$("#clear").click(function () {
$("#in").val("");
$("#out").val("");
})
$("#utf8Tobase64").click(function () {
var inText = $("#in").val();
var out = utf8ToBase64( inText );
$("#out").val( out );
})
$("#base64ToUtf8").click(function () {
var inText = $("#in").val();
var out = base64ToUtf8(inText)
$("#out").val( out );
})
$("#base64ToHex").click(function () {
var inText = $("#in").val();
var out = base64ToHex(inText)
$("#out").val( out );
})
$("#hexToBase64").click(function () {
var inText = $("#in").val();
var out = hexToBase64( inText )
$("#out").val( out );
})
$("#hexToUtf8").click(function () {
var inText = $("#in").val();
out = hexToUtf8(inText)
$("#out").val( out );
})
$("#utf8ToHex").click(function () {
var inText = $("#in").val();
out = utf8ToHex( inText )
$("#out").val( out );
})
})
</script>
</body>
</html>

4
swa/beast/jquery.min.js vendored Normal file

File diff suppressed because one or more lines are too long

37
swa/beast/test.js Normal file
View File

@ -0,0 +1,37 @@
const tool = require("./tool")
const str1 = "722 黄谦 cheney";
const str2 = "MIIBygYJKoZIhvcNAQcDoIIBuzCCAbcCAQAxggFLMIIBRwIBADAvMCMxCzAJBgNVBAYTAmNuMRQwEgYDVQQKEwtQQkMgVEVTVCBDQQIIE6NthajbntAwDQYJKoZIhvcNAQEBBQAEggEAfpqiXGzxULaCOJIPqRKFAsk/21WIg+NnrkgP/18OxSr68vnpLXKB2aDsyntX9RkwDVc/VwD7nrAq9l0xZPndrYQS2h8ayFfFUan7L5MtOvxS4Pt5+o84DE00+3axfkAr2v7I79tWFmAc0sipn+nQcJzoy0owknfG41hMauMrPI9jdtb1ZcUWLH0bMQ3VeYJJi8RSFYqirpc+RM3sOqwIvBthDcMdnH4XoUx4FKSdnpUd5wHd8Q1cEleVA1PAuEtim2ivjJ8450Y/08pURDOWcmabvX/f4mMp9437uigaC4qShRilyX3/Dt3xhdjq6ImKGxwLUqAaIM6DtHub08S0OTBjBgkqhkiG9w0BBwEwFAYIKoZIhvcNAwcECP6Q/L2a03NMgECXtfqTp+J8JJGL9mNjf51jMe+C4E02q6UQtImLqmvnBEXCnkDLKOBIvOO7ADrlRDN73cma0865Qp1QXP2PT7ez"
const hex2 = "308201ca06092a864886f70d010703a08201bb308201b70201003182014b30820147020100302f3023310b300906035504061302636e31143012060355040a130b5042432054455354204341020813a36d85a8db9ed0300d06092a864886f70d0101010500048201007e9aa25c6cf150b68238920fa9128502c93fdb558883e367ae480fff5f0ec52afaf2f9e92d7281d9a0ecca7b57f519300d573f5700fb9eb02af65d3164f9ddad8412da1f1ac857c551a9fb2f932d3afc52e0fb79fa8f380c4d34fb76b17e402bdafec8efdb5616601cd2c8a99fe9d0709ce8cb4a309277c6e3584c6ae32b3c8f6376d6f565c5162c7d1b310dd57982498bc452158aa2ae973e44cdec3aac08bc1b610dc31d9c7e17a14c7814a49d9e951de701ddf10d5c1257950353c0b84b629b68af8c9f38e7463fd3ca5444339672669bbd7fdfe26329f78dfbba281a0b8a928518a5c97dff0eddf185d8eae8898a1b1c0b52a01a20ce83b47b9bd3c4b439306306092a864886f70d010701301406082a864886f70d03070408fe90fcbd9ad3734c804097b5fa93a7e27c24918bf663637f9d6331ef82e04d36aba510b4898baa6be70445c29e40cb28e048bce3bb003ae544337bddc99ad3ceb9429d505cfd8f4fb7b3"
const str3 = "722 cheney";
const ret2 = tool.base64ToHex( str2 )
console.log("hex=" + ret2)
console.assert( ret2 === hex2, "base64ToHex 转换失败" );
const ret22 = tool.hexToBase64( ret2 )
console.assert( str2 === ret22, "base64 hex 转换失败" );
const base64 = tool.utf8ToBase64(str1)
const ret3 = tool.base64ToHex( base64 )
console.log("base64ToHex hex=" + ret3 )
const ret32 = tool.hexToBase64( ret3 )
console.assert( ret32 === base64, "base64 hex 中文 转换失败" );
var ret11 = tool.utf8ToBase64(str1)
console.log("hex=" + ret11 )
var ret12 = tool.base64ToUtf8(ret11)
console.log("ret12=" + ret12)
console.assert( str1 === ret12, "base64 String 中文转换失败" );
var ret4 = tool.utf8ToHex(str1);
var ret41 = tool.hexToUtf8(ret4);
console.assert( str1 === ret41, "hex String 中文转换失败" );

551
swa/beast/tool.js Normal file
View File

@ -0,0 +1,551 @@
var codePoint2utf8 = function (code) {
var bin = parseInt(code).toString(2)
var ln = 0;
var mx = 0;
if (bin.length <= 7) {
ln = 1;
mx = 7;
} else if (bin.length > 7 && bin.length <= 11) {
ln = 2;
mx = 11;
} else if (bin.length > 11 && bin.length <= 16) {
ln = 3;
mx = 16;
} else if (bin.length > 16 && bin.length <= 21) {
ln = 4;
mx = 21;
} else if (bin.length > 21 && bin.length <= 26) {
ln = 5;
mx = 26;
} else if (bin.length > 26 && bin.length <= 31) {
ln = 6;
mx = 31;
};
var longbin = ("0".repeat(mx) + bin).slice(-mx)
var result = '';
for (var i = 0; i < ln; i++) {
if (ln != 1) {
if (i == 0) {
result += parseInt("1".repeat(ln) + "0" + longbin.slice(0,7-ln),2).toString(16);
longbin = longbin.slice(7-ln);
} else {
result += parseInt("10" + longbin.slice(0,6),2).toString(16);
longbin = longbin.slice(6);
};
} else {
result += ("00" + parseInt(longbin,2).toString(16)).slice(-2);
};
};
return result;
};
var stringToHex = function (inputstring) {
var result = '';
for (var i = 0; i < inputstring.length; i++) {
result += codePoint2utf8(inputstring.codePointAt(i))
};
return result;
};
var hexToString = function (inputstring) {
try {
var result = decodeURIComponent(inputstring.toLowerCase().replace(/\s+/g, '').replace(/[0-9a-f]{2}/g, '%$&'));
} catch(e) {
throw "Not valid UTF-8 hex code!";
};
return result;
};
function stringToByte(str) {
var bytes = new Array();
var len, c;
len = str.length;
for(var i = 0; i < len; i++) {
c = str.charCodeAt(i);
if(c >= 0x010000 && c <= 0x10FFFF) {
bytes.push(((c >> 18) & 0x07) | 0xF0);
bytes.push(((c >> 12) & 0x3F) | 0x80);
bytes.push(((c >> 6) & 0x3F) | 0x80);
bytes.push((c & 0x3F) | 0x80);
} else if(c >= 0x000800 && c <= 0x00FFFF) {
bytes.push(((c >> 12) & 0x0F) | 0xE0);
bytes.push(((c >> 6) & 0x3F) | 0x80);
bytes.push((c & 0x3F) | 0x80);
} else if(c >= 0x000080 && c <= 0x0007FF) {
bytes.push(((c >> 6) & 0x1F) | 0xC0);
bytes.push((c & 0x3F) | 0x80);
} else {
bytes.push(c & 0xFF);
}
}
return bytes;
}
// utf8
function byteToString(arr) {
if(typeof arr === 'string') {
return arr;
}
var str = '',
_arr = arr;
for(var i = 0; i < _arr.length; i++) {
var one = _arr[i].toString(2),
v = one.match(/^1+?(?=0)/);
if(v && one.length == 8) {
var bytesLength = v[0].length;
var store = _arr[i].toString(2).slice(7 - bytesLength);
for(var st = 1; st < bytesLength; st++) {
store += _arr[st + i].toString(2).slice(2);
}
str += String.fromCharCode(parseInt(store, 2));
i += bytesLength - 1;
} else {
str += String.fromCharCode(_arr[i]);
}
}
return str;
}
/**
* Convert the given string to byte array
*
* @param {string} str the string to be converted to byte array
* @returns {number[]}
*/
var str2bytes = function (str) {
var i = 0;
var ch = null;
var hex = null;
var encoded = encodeURIComponent(str);
var length = encoded.length;
var bytes = [];
while (i < length) {
ch = encoded.charAt(i++);
if (ch === '%') {
hex = encoded.charAt(i++)
hex += encoded.charAt(i++);
bytes.push(parseInt(hex, 16));
} else {
bytes.push(ch.charCodeAt(0));
}
}
return bytes;
};
/**
* Convert the given byte array to string
*
* @param {number[]} bytes The byte array to be converted to string
* @returns {string}
*/
var bytes2str = function (bytes) {
var i = 0;
var hex = null;
var byte = 0;
var hexArray = [];
var length = bytes.length;
while (i < length) {
byte = bytes[i++];
hex = byte.toString(16);
hex = hex.length < 2 ? ('%0' + hex) : ('%' + hex);
hexArray.push(hex);
}
return decodeURIComponent(hexArray.join(''));
};
function base64ArrayBuffer(arrayBuffer) {
var base64 = ''
var encodings = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='
var bytes = new Uint8Array(arrayBuffer)
var byteLength = bytes.byteLength
var byteRemainder = byteLength % 3
var mainLength = byteLength - byteRemainder
var a, b, c, d
var chunk
// Main loop deals with bytes in chunks of 3
for (var i = 0; i < mainLength; i = i + 3) {
// Combine the three bytes into a single integer
chunk = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2]
// Use bitmasks to extract 6-bit segments from the triplet
a = (chunk & 16515072) >> 18 // 16515072 = (2^6 - 1) << 18
b = (chunk & 258048) >> 12 // 258048 = (2^6 - 1) << 12
c = (chunk & 4032) >> 6 // 4032 = (2^6 - 1) << 6
d = chunk & 63 // 63 = 2^6 - 1
// Convert the raw binary segments to the appropriate ASCII encoding
base64 += encodings[a] + encodings[b] + encodings[c] + encodings[d]
}
// Deal with the remaining bytes and padding
if (byteRemainder == 1) {
chunk = bytes[mainLength]
a = (chunk & 252) >> 2 // 252 = (2^6 - 1) << 2
// Set the 4 least significant bits to zero
b = (chunk & 3) << 4 // 3 = 2^2 - 1
base64 += encodings[a] + encodings[b] + '=='
} else if (byteRemainder == 2) {
chunk = (bytes[mainLength] << 8) | bytes[mainLength + 1]
a = (chunk & 64512) >> 10 // 64512 = (2^6 - 1) << 10
b = (chunk & 1008) >> 4 // 1008 = (2^6 - 1) << 4
// Set the 2 least significant bits to zero
c = (chunk & 15) << 2 // 15 = 2^4 - 1
base64 += encodings[a] + encodings[b] + encodings[c] + '='
}
return base64
}
(function() {
var base64EncodeChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
base64DecodeChars = new Array(( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), 62, ( - 1), ( - 1), ( - 1), 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), ( - 1), 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, ( - 1), ( - 1), ( - 1), ( - 1), ( - 1));
this.base64encode = function(e) {
var r, a, c, h, o, t;
for (c = e.length, a = 0, r = ''; a < c;) {
if (h = 255 & e.charCodeAt(a++), a == c) {
r += base64EncodeChars.charAt(h >> 2),
r += base64EncodeChars.charAt((3 & h) << 4),
r += '==';
break
}
if (o = e.charCodeAt(a++), a == c) {
r += base64EncodeChars.charAt(h >> 2),
r += base64EncodeChars.charAt((3 & h) << 4 | (240 & o) >> 4),
r += base64EncodeChars.charAt((15 & o) << 2),
r += '=';
break
}
t = e.charCodeAt(a++),
r += base64EncodeChars.charAt(h >> 2),
r += base64EncodeChars.charAt((3 & h) << 4 | (240 & o) >> 4),
r += base64EncodeChars.charAt((15 & o) << 2 | (192 & t) >> 6),
r += base64EncodeChars.charAt(63 & t)
}
return r
}
this.base64decode = function(e) {
var r, a, c, h, o, t, d;
for (t = e.length, o = 0, d = ''; o < t;) {
do r = base64DecodeChars[255 & e.charCodeAt(o++)];
while (o < t && r == -1);
if (r == -1) break;
do a = base64DecodeChars[255 & e.charCodeAt(o++)];
while (o < t && a == -1);
if (a == -1) break;
d += String.fromCharCode(r << 2 | (48 & a) >> 4);
do {
if (c = 255 & e.charCodeAt(o++), 61 == c) return d;
c = base64DecodeChars[c]
} while ( o < t && c == - 1 );
if (c == -1) break;
d += String.fromCharCode((15 & a) << 4 | (60 & c) >> 2);
do {
if (h = 255 & e.charCodeAt(o++), 61 == h) return d;
h = base64DecodeChars[h]
} while ( o < t && h == - 1 );
if (h == -1) break;
d += String.fromCharCode((3 & c) << 6 | h)
}
return d
}
this.HexToBase64 = function(str) {
return base64encode(String.fromCharCode.apply(null, str.replace(/\r|\n/g, "").replace(/([\da-fA-F]{2}) ?/g, "0x$1 ").replace(/ +$/, "").split(" ")));
}
this.Base64Tohex = function(str) {
for (var i = 0,
bin = base64decode(str.replace(/[ \r\n]+$/, "")), hex = []; i < bin.length; ++i) {
var tmp = bin.charCodeAt(i).toString(16);
if (tmp.length === 1) tmp = "0" + tmp;
hex[hex.length] = tmp;
}
return hex.join("");
},
this.toBytes = function(str) {
for (var bytes = [], c = 0; c < str.length; c += 2)
bytes.push(parseInt(str.substr(c, 2), 16));
return bytes;
}
}) ();
//hexToBase64 Base64Tohex base64decode base64encode
var bytesToString = function(bytes){
return hexToString(bytesToHex(bytes));
}
var bytesToBase64 = function(bytes){
return base64ArrayBuffer(bytes);
}
// Convert a byte array to a hex string
var bytesToHex = function(bytes) {
for (var hex = [], i = 0; i < bytes.length; i++) {
hex.push((bytes[i] >>> 4).toString(16));
hex.push((bytes[i] & 0xF).toString(16));
}
return hex.join("");
}
var stringToBase64 = function(str){
return base64encode(str);
}
var stringToBytes = function(str){
return hexToBytes(stringToHex(str));
}
// Convert a ASCII string to a hex string
var stringToHex = function(str) {
return str.split("").map(function(c) {
return ("0" + c.charCodeAt(0).toString(16)).slice(-2);
}).join("");
}
var hexToBytes= function(hex) {
for (var bytes = [], c = 0; c < hex.length; c += 2)
bytes.push(parseInt(hex.substr(c, 2), 16));
return bytes;
}
// Convert a hex string to a ASCII string
var hexToString = function(hexStr) {
var hex = hexStr.toString();//force conversion
var str = '';
for (var i = 0; i < hex.length; i += 2)
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
return str;
}
var hexToBase64 = function(hexStr){
return HexToBase64(hexStr);
}
var base64ToString = function(base64str){
return base64decode(base64str);
}
const Base64 = {
_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
encode: function(e) {
var t = "";
var n, r, i, s, o, u, a;
var f = 0;
e = Base64._utf8_encode(e);
while (f < e.length) {
n = e.charCodeAt(f++);
r = e.charCodeAt(f++);
i = e.charCodeAt(f++);
s = n >> 2;
o = (n & 3) << 4 | r >> 4;
u = (r & 15) << 2 | i >> 6;
a = i & 63;
if (isNaN(r)) {
u = a = 64
} else if (isNaN(i)) {
a = 64
}
t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a)
}
return t
},
decode: function(e) {
var t = "";
var n, r, i;
var s, o, u, a;
var f = 0;
e = e.replace(/[^A-Za-z0-9+/=]/g, "");
while (f < e.length) {
s = this._keyStr.indexOf(e.charAt(f++));
o = this._keyStr.indexOf(e.charAt(f++));
u = this._keyStr.indexOf(e.charAt(f++));
a = this._keyStr.indexOf(e.charAt(f++));
n = s << 2 | o >> 4;
r = (o & 15) << 4 | u >> 2;
i = (u & 3) << 6 | a;
t = t + String.fromCharCode(n);
if (u != 64) {
t = t + String.fromCharCode(r)
}
if (a != 64) {
t = t + String.fromCharCode(i)
}
}
t = Base64._utf8_decode(t);
return t
},
_utf8_encode: function(e) {
e = e.replace(/rn/g, "n");
var t = "";
for (var n = 0; n < e.length; n++) {
var r = e.charCodeAt(n);
if (r < 128) {
t += String.fromCharCode(r)
} else if (r > 127 && r < 2048) {
t += String.fromCharCode(r >> 6 | 192);
t += String.fromCharCode(r & 63 | 128)
} else {
t += String.fromCharCode(r >> 12 | 224);
t += String.fromCharCode(r >> 6 & 63 | 128);
t += String.fromCharCode(r & 63 | 128)
}
}
return t
},
_utf8_decode: function(e) {
var t = "";
var n = 0;
var r = 0;
var c1 =0;
var c2 =0;
var c3 =0;
while (n < e.length) {
r = e.charCodeAt(n);
if (r < 128) {
t += String.fromCharCode(r);
n++
} else if (r > 191 && r < 224) {
c2 = e.charCodeAt(n + 1);
t += String.fromCharCode((r & 31) << 6 | c2 & 63);
n += 2
} else {
c2 = e.charCodeAt(n + 1);
c3 = e.charCodeAt(n + 2);
t += String.fromCharCode((r & 15) << 12 | (c2 & 63) << 6 | c3 & 63);
n += 3
}
}
return t
}
}
function encodeUtf8(text) {
const code = encodeURIComponent(text);
const bytes = [];
for (var i = 0; i < code.length; i++) {
const c = code.charAt(i);
if (c === '%') {
const hex = code.charAt(i + 1) + code.charAt(i + 2);
const hexVal = parseInt(hex, 16);
bytes.push(hexVal);
i += 2;
} else bytes.push(c.charCodeAt(0));
}
return bytes;
}
function decodeUtf8(bytes) {
var encoded = "";
for (var i = 0; i < bytes.length; i++) {
encoded += '%' + bytes[i].toString(16);
}
return decodeURIComponent(encoded);
}
function strToBytesUTF8(str) {
let utf8 = [];
for (let i = 0; i < str.length; i++) {
let charcode = str.charCodeAt(i);
if (charcode < 0x80) utf8.push(charcode);
else if (charcode < 0x800) {
utf8.push(0xc0 | (charcode >> 6),
0x80 | (charcode & 0x3f));
}
else if (charcode < 0xd800 || charcode >= 0xe000) {
utf8.push(0xe0 | (charcode >> 12),
0x80 | ((charcode>>6) & 0x3f),
0x80 | (charcode & 0x3f));
}
// surrogate pair
else {
i++;
// UTF-16 encodes 0x10000-0x10FFFF by
// subtracting 0x10000 and splitting the
// 20 bits of 0x0-0xFFFFF into two halves
charcode = 0x10000 + (((charcode & 0x3ff)<<10)
| (str.charCodeAt(i) & 0x3ff));
utf8.push(0xf0 | (charcode >>18),
0x80 | ((charcode>>12) & 0x3f),
0x80 | ((charcode>>6) & 0x3f),
0x80 | (charcode & 0x3f));
}
}
return utf8;
}
function utf8ToBase64(str){
var ret11 = strToBytesUTF8( str )
return bytesToBase64( ret11 )
}
function base64ToUtf8( str ){
var hex = base64ToHex( str );
var ret = hexToBytes( hex )
// var ret = base64ToBytes( str )
return decodeUtf8(ret);
}
var base64ToHex = function(base64str){
return Base64Tohex(base64str);
}
var base64ToBytes = function(base64str){
return toBytes(base64str);
//null
}
var utf8ToHex = function (str) {
var ret11 = strToBytesUTF8( str )
return bytesToHex( ret11 )
}
var hexToUtf8 = function (hex) {
var ret = hexToBytes( hex )
// var ret = base64ToBytes( str )
return decodeUtf8(ret);
}
if ( module ) {
module.exports = {
stringToByte,
byteToString,
str2bytes,
bytes2str,
base64ArrayBuffer,
bytesToString,
bytesToBase64,
bytesToHex,
stringToBase64,
stringToBytes,
stringToHex,
hexToBytes,
hexToString,
hexToBase64,
base64ToString,
base64ToHex,
base64ToBytes,
Base64,
encodeUtf8,
decodeUtf8,
strToBytesUTF8,
utf8ToBase64,
base64ToUtf8,
utf8ToHex,
hexToUtf8
}
}

BIN
swa/ic/active-ic.zip Normal file

Binary file not shown.

View File

@ -57,7 +57,7 @@ function hexToString(hex){
class ActiveIC {
constructor() {
this.server = "ws://127.0.0.1:12322/active";
this.server = "ws://127.0.0.1:22222/active";
this.waitMap = {}
}

View File

@ -184,6 +184,11 @@
<div class="tab tab_active" style="padding-top: 1rem">
<ul>
<li>
<h4 style="color: var(--mainColor);">V1.0 <a href="./active-ic.zip" style="font-size: 0.5rem; font-weight: normal; cursor: pointer">(点击下载)</a> </h4>
<p>【2023年12月15日】</p>
<p>端口改为 2222</p>
</li>
<li>
<h4 style="color: var(--mainColor);">V1.0 <a href="./active_ic_setup.exe" style="font-size: 0.5rem; font-weight: normal; cursor: pointer">(点击下载)</a> </h4>
<p>【2022年12月22日】</p>

6
swa/u/Readme.md Normal file
View File

@ -0,0 +1,6 @@
# UKey 读写工具
【2023年12月1日】
从 mainkey 文件生成三个 ukey
【2023年12月15日】
把三个 ukey 内的主密钥生成 mainkey 文件

View File

@ -79,6 +79,10 @@
<a href="#" name="tab_main">主密钥分散</a>
</li>
<li>
<a href="#" name="tab_main_comp">主密钥合成</a>
</li>
<li>
<a href="#" name="tab_file">文件操作</a>
</li>
@ -138,6 +142,26 @@
</div>
<div class="tab tab_main_comp" style="display: none">
<div style="margin: 3rem 0">
<span id="show_m1" style="display: none">[分量1已录入]</span>
<button id="btn_loadm1" style="margin-right: 1rem">读取分量1</button>
<span id="show_m2" style="display: none">[分量2已录入]</span>
<button id="btn_loadm2" style="margin-right: 1rem">写入分量2</button>
<span id="show_m3" style="display: none">[分量3已录入]</span>
<button id="btn_loadm3" style="margin-right: 1rem">写入分量3</button>
</div>
<div class="form" id="mainkey_out" style="display: none">
<p>
<span>主密钥已合成,</span><button id="mainkey_comp_show" onclick="downloadMainKey()">点我下载</button><span>!</span>
</p>
</div>
</div>
<div class="tab tab_file" style="display: none">
@ -567,6 +591,129 @@
</script>
<script type="application/javascript">
function publicRead(filepath) {
let txt = ''
try {
const idx = filepath.lastIndexOf("\\")
const folder = filepath.substr(0, idx)
const file = filepath.substr(idx + 1)
txt = window.UKey.readFile(folder, file);
return txt.data;
} catch (e) {
alert("读取失败:" + e.message)
}
return txt
}
function readKey( p ){
var role = publicRead('\\root\\mana\\a20')
console.log("role", role);
if ( role != p ) {
alert("分量编号错误")
return
}
if ( ! window.mk ) {
window.mk = {}
}
if ( 31 == p ) {
window.mk.weight0x30 = publicRead('\\root\\mana\\a30')
window.mk.weight0x40 = publicRead('\\root\\mana\\a40')
window.mk.weight0x401 = publicRead('\\root\\mana\\a40')
window.mk.weight0x50 = publicRead('\\root\\mana\\a50')
window.mk.weight0x60 = publicRead('\\root\\mana\\a60')
window.mk.weight0x601 = publicRead('\\root\\mana\\a60')
} else if ( 32 == p ) {
window.mk.weight0x402 = publicRead('\\root\\mana\\a40')
window.mk.weight0x602 = publicRead('\\root\\mana\\a60')
} else if ( 33 == p ) {
window.mk.weight0x403 = publicRead('\\root\\mana\\a40')
window.mk.weight0x603 = publicRead('\\root\\mana\\a60')
} else {
alert("分量编号错误")
}
// 每次都执行
$("#btn_loadm" + ( p - 30 )).hide()
$("#show_m" + ( p - 30 )).show()
// 全部结束后执行
if ( window.mk.weight0x601 && window.mk.weight0x602 && window.mk.weight0x603 ) {
var mk = checkValue( window.mk.weight0x601, window.mk.weight0x602, window.mk.weight0x603 )
if ( mk ) {
$("#mainkey_out").show();
window.mkd = mk;
}
}
}
$("#btn_loadm1").click(function (){
readKey( 31 )
})
$("#btn_loadm2").click(function (){
readKey( 32 )
})
$("#btn_loadm3").click(function (){
readKey( 33 )
})
// 将十六进制字符串转换为二进制数组
function hexToBytes(hex) {
const bytes = new Uint8Array(hex.length / 2);
for (let i = 0; i < hex.length; i += 2) {
bytes[i / 2] = parseInt(hex.substring(i, i + 2), 16);
}
return bytes;
}
function downloadMainKey(){
// 创建一个Blob对象
const bytes = hexToBytes(window.mkd);
const blob = new Blob([bytes], { type: 'application/octet-stream' });
// 生成一个临时的URL
const blobUrl = URL.createObjectURL(blob);
// 创建一个a标签并设置为下载链接
const downloadLink = document.createElement('a');
downloadLink.href = blobUrl;
downloadLink.download = 'MainKey.Dat'; // 指定下载文件的名称
// 触发a标签的点击事件以开始下载
document.body.appendChild(downloadLink);
downloadLink.click();
document.body.removeChild(downloadLink);
// 清理URL
URL.revokeObjectURL(blobUrl);
}
function checkValue(p1, p2, p3){
const protectKey = window.gmhelper.xor(p1, p2, p3)
const protectKcv = window.gmhelper.kcv( protectKey )
if ( protectKcv.toUpperCase().substr(0, 8) != window.mk.weight0x50.toUpperCase()) {
alert('保护密钥校验值错误!!!')
return false
}
var finalMainKey = window.gmhelper.decryptKey(window.mk.weight0x40 , protectKey) // 解密
const mainKcv = window.gmhelper.kcv( finalMainKey )
if ( mainKcv.toUpperCase().substr(0, 8) !== window.mk.weight0x30.toUpperCase()) {
alert('主密钥校验值错误!!!')
return false
}
return finalMainKey;
}
</script>
</body>
</html>

View File

@ -1,6 +1,5 @@
docker rm -vf fullstack.web
docker run -d ^
-p 80:80 ^
--rm ^
docker run -d --name fullstack.web^
-p 8080:8080 ^
fullstack.web
start http://localhost.fullstack.club/
start http://localhost.fullstack.club:8080/