-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
211 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/dist | ||
/dist | ||
/web |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# php.porttable.debug | ||
|
||
#### 介绍 | ||
|
||
PHP代码本地调试工具,版本号为5.2.17,可作为CTF web辅助工具,例如php反序列化 | ||
|
||
注意:编辑框组建依赖webview2 | ||
|
||
#### 下载 | ||
|
||
参考release文件,也可下载aardio手动编译 | ||
|
||
#### 编译 | ||
|
||
使用webstorm(推荐)打开web.src目录 | ||
|
||
npm install 下载依赖包 | ||
|
||
npm build 执行webpack打包输出到web目录 | ||
|
||
aardio IDE打开项目 | ||
|
||
#### 软件截图 | ||
|
||
 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<project ver="34" name="php.porttable.debug" libEmbed="true" icon="..." ui="win" output="php.porttable.debug.exe" CompanyName="单位名称" FileDescription="php.porttable.debug" LegalCopyright="Copyright (C) 作者 2022" ProductName="php.porttable.debug" InternalName="php.porttable.debug" FileVersion="0.0.0.1" ProductVersion="0.0.0.1" publishDir="/dist/" dstrip="false"> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<project ver="10" name="php.porttable.debug" libEmbed="true" icon="..." ui="win" output="php.porttable.debug.exe" CompanyName="单位名称" FileDescription="php.porttable.debug" LegalCopyright="Copyright (C) 作者 2022" ProductName="php.porttable.debug" InternalName="php.porttable.debug" FileVersion="0.0.0.1" ProductVersion="0.0.0.1" publishDir="/dist/" dstrip="false" local="false" ignored="false"> | ||
<file name="main.aardio" path="main.aardio" comment="main.aardio"/> | ||
<folder name="资源文件" path="res" embed="true"/> | ||
<folder name="窗体文件" path="dlg" comment="目录" embed="true"/> | ||
<folder name="资源文件" path="res" embed="true" local="false" ignored="false"/> | ||
<folder name="窗体文件" path="dlg" comment="目录" embed="true" local="false" ignored="false"/> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
dist/*.js | ||
dist/*.ttf | ||
.idea/*.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | ||
</head> | ||
<body> | ||
<div id="container" style="width: 710px; height: 430px; border: 1px solid #ccc"></div> | ||
|
||
|
||
</body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import * as monaco from 'monaco-editor'; | ||
|
||
// sample | ||
// https://github.com/microsoft/monaco-editor/blob/main/samples/browser-esm-webpack-small/index.js | ||
import 'monaco-editor/esm/vs/basic-languages/php/php.js'; | ||
|
||
self.MonacoEnvironment = { | ||
getWorkerUrl: function (moduleId, label) { | ||
// if (label === 'json') { | ||
// return './json.worker.bundle.js'; | ||
// } | ||
// if (label === 'css' || label === 'scss' || label === 'less') { | ||
// return './css.worker.bundle.js'; | ||
// } | ||
// if (label === 'html' || label === 'handlebars' || label === 'razor') { | ||
// return './html.worker.bundle.js'; | ||
// } | ||
// if (label === 'typescript' || label === 'javascript') { | ||
// return './ts.worker.bundle.js'; | ||
// } | ||
return './editor.worker.bundle.js'; | ||
} | ||
}; | ||
|
||
window.editormodel = monaco.editor.create(document.getElementById('container'), { | ||
value: [ | ||
'class ctfShowUser{', | ||
' public $username=\'xxxxxx\';', | ||
' public $password=\'xxxxxx\';', | ||
' public function checkVip(){', | ||
" return $this->isVip;", | ||
' }', | ||
'}', | ||
'', | ||
'$v = serialize(new ctfShowUser());', | ||
'echo $v;', | ||
'echo urlencode($v);', | ||
].join('\n'), | ||
language: 'php' | ||
}); | ||
|
||
window.editorGetText = function () { | ||
if(window.editormodel) { | ||
let text = window.editormodel.getValue(); | ||
return text; | ||
} | ||
return ""; | ||
}; | ||
|
||
window.editorSetText = function (text) { | ||
if(window.editormodel) { | ||
window.editormodel.setValue(text); | ||
} | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
rd /s /q node_modules | ||
rd /s /q dist | ||
rm package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "browser-esm-webpack", | ||
"scripts": { | ||
"build": "node ./node_modules/webpack/bin/webpack.js --progress" | ||
}, | ||
"author": "Microsoft Corporation", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"css-loader": "^6.6.0", | ||
"file-loader": "^6.2.0", | ||
"html-webpack-plugin": "^5.5.0", | ||
"monaco-editor": "^0.32.1", | ||
"monaco-editor-webpack-plugin": "^7.0.1", | ||
"style-loader": "^3.3.1", | ||
"terser-webpack-plugin": "^5.3.1", | ||
"webpack": "^5.68.0", | ||
"webpack-cli": "^4.9.2", | ||
"webpack-dev-server": "^4.7.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
1. npm install 下载依赖包 | ||
2. npm build 执行webpack打包 输出到web目录 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
const path = require('path'); | ||
const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
|
||
module.exports = { | ||
mode: 'development', | ||
plugins:[ | ||
new HtmlWebpackPlugin({ | ||
title:'', | ||
template: './index.html', | ||
inject: 'body', | ||
}), | ||
], | ||
entry: { | ||
app: './index.js', | ||
'editor.worker': 'monaco-editor/esm/vs/editor/editor.worker.js', | ||
//'json.worker': 'monaco-editor/esm/vs/language/json/json.worker', | ||
//'css.worker': 'monaco-editor/esm/vs/language/css/css.worker', | ||
//'html.worker': 'monaco-editor/esm/vs/language/html/html.worker', | ||
//'ts.worker': 'monaco-editor/esm/vs/language/typescript/ts.worker' | ||
}, | ||
output: { | ||
globalObject: 'self', | ||
filename: '[name].bundle.js', | ||
path: path.resolve(__dirname, '../web') | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.css$/, | ||
use: ['style-loader', 'css-loader'] | ||
}, | ||
{ | ||
test: /\.ttf$/, | ||
use: ['file-loader'] | ||
} | ||
] | ||
} | ||
}; |