Comments (7)
贴一下import的库
from ctfcracktools.
#!/usr/bin/env python
-- coding: utf-8 --
'''
{
title: test,
type: crypto,
author: YellowTail,
detail: test,
Dialog: null
}
'''
def test(word):
print("test!")
return word+"\nsuccess test!"
def main(wordin)
return test(wordin)
代码如上
没有import库XD,在自己尝试使用test的时候报错了
from ctfcracktools.
hello 很抱歉时隔这么久才给你回复
你这段代码我跑了一次,存在这么几个问题
注释里面的各个类别建议别加上逗号,
然后就是你的def main(wordin)没有加上:导致无法调用
还需要注意的是 如果加上\n换行的话,框架只能读取最后一行的返回值。
你可以将返回的值储存到一个string值里面,这样就可以完整显示了
from ctfcracktools.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
{
title:test
type:crypto
author:YellowTail
detail:test
Dialog:
}
'''
def test(word):
return word+"\nsuccess test!"
def main(wordin):
return test(wordin)
如果不需要dialog的话不需要写null,而是空出来,这是我修改之后的代码,可以尝试下,可以运行。
from ctfcracktools.
首先对我上次的一些python的基本错误道歉,上次应该是由于自身粗心而导致的语法问题
但是这是还是运行错误了,这是我软件版本问题吗(假如你从上次到现在还没更新的话)?
我用了你的代码贴上去,然后根据你说的把字符串存储到一个str里了,但是仍是运行报错
你给的原来的代码也是报一样的错误
插件代码如下
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
{
title:test
type:crypto
author:YellowTail
detail:test
Dialog:
}
'''
def test(word):
s = word+"\nsuccess test!"
return s
def main(wordin):
return test(wordin)
以下是cmd报错的代码:
D:\0\Tool\Misc\CTFCrackTool\CTFCrackTools>java -jar CTFCrackToolsKt-3.2.3.jar
java.lang.IllegalArgumentException: Cannot create PyString with non-byte value
at org.python.core.PyString.<init>(PyString.java:64)
at org.python.core.PyString.<init>(PyString.java:70)
at org.python.core.Py.newString(Py.java:643)
at org.python.core.Py.fromIOException(Py.java:237)
at org.python.core.Py.IOError(Py.java:212)
at org.python.core.__builtin__.execfile_flags(__builtin__.java:522)
at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:286)
at Core$buildPluginMenuItem$1.actionPerformed(Core.kt:847)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
kotlin.TypeCastException: null cannot be cast to non-null type org.python.core.PyFunction
at Core$buildPluginMenuItem$1.actionPerformed(Core.kt:890)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
from ctfcracktools.
把原来储存在配置文件里的插件删了,重新添加一下。就可以解决了
from ctfcracktools.
十分感谢
from ctfcracktools.
Related Issues (20)
- jdk13 需要把鼠标放上去图标才出现 HOT 1
- 新版本kot在windows和linux系统下怎么跑起来呢? HOT 2
- v3.2.4 的对于单个字符的URLencoding失败 HOT 1
- 无法正常显示 HOT 2
- 文档说支持的requests库导入也报错 HOT 2
- 内容有中文字符时插件调用失败
- 初次添加插件,重复在popup menu处添加 HOT 3
- v400加载不了plugin HOT 2
- 改用垂直翻页 HOT 1
- Radiex Convert --> Radix Convert
- 猪圈密码解码时遇到字母Y和Z会报错 HOT 3
- 莫斯编码解码不支持英文问号“?”
- 4.0x版本如何打开 HOT 1
- 编译版本运行报错 HOT 1
- 报错,Exception in thread "main" java.lang.ExceptionInInitializerError。 HOT 6
- issue提交规范 HOT 4
- Bugs in vigenere and morse encode decode
- 插件无法使用
- 莫斯加密部分好像有点问题
- 莫斯加密部分好像有点问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ctfcracktools.