Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InvalidPathException: Illegal char <:> at index 2 #14

Open
NancyAurum opened this issue Jul 21, 2024 · 1 comment
Open

InvalidPathException: Illegal char <:> at index 2 #14

NancyAurum opened this issue Jul 21, 2024 · 1 comment

Comments

@NancyAurum
Copy link

Is it supposed to work on Windows at all?

Illegal char <:> at index 2: /C:/Users/nangl/d/code/dest/unfbov/st.exe
java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/nangl/d/code/dest/unfbov/st.exe
	at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
	at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
	at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
	at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
	at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:232)
	at java.base/java.nio.file.Path.of(Path.java:147)
	at java.base/java.nio.file.Paths.get(Paths.java:69)
	at resources.GhidraSrc.getJavaData(GhidraSrc.java:121)
	at resources.GhidraSrc.getData(GhidraSrc.java:78)
	at Cantordust.run(Cantordust.java:36)
	at ghidra.app.script.GhidraScript.executeNormal(GhidraScript.java:405)
	at ghidra.app.script.GhidraScript.doExecute(GhidraScript.java:260)
	at ghidra.app.script.GhidraScript.execute(GhidraScript.java:238)
	at ghidra.app.plugin.core.script.RunScriptTask.run(RunScriptTask.java:47)
	at ghidra.util.task.Task.monitoredRun(Task.java:134)
	at ghidra.util.task.TaskRunner.lambda$startTaskThread$0(TaskRunner.java:106)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)

---------------------------------------------------
Build Date: 2024-Jul-06 2008 CEST
Ghidra Version: 11.2
Java Home: C:\Program Files\Java\jdk-17
JVM Version: Oracle Corporation 17.0.7
OS: Windows 11 10.0 amd64
Workstation: NANCYBOOK
@NancyAurum
Copy link
Author

NancyAurum commented Jul 22, 2024

Workaround:
Edit resources/GhidraSrc.java/getJavaData, by changing the System.getProperty("os.name") to do

System.getProperty("os.name").contains("Windows")

There is another issue where Cantordust fails to handle segmented files (i.e. 16bit dos executables)

And it throws a ton of other exceptions, like

Cannot invoke "java.lang.Integer.intValue()" because the return value of "java.util.HashMap.get(Object)" is null
java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "java.util.HashMap.get(Object)" is null
	at resources.MetricMap$6.mousePressed(MetricMap.java:158)
	at resources.MetricMap$5.mousePressed(MetricMap.java:135)
	at resources.MetricMap$5.mouseDragged(MetricMap.java:126)
	at java.desktop/java.awt.Component.processMouseMotionEvent(Component.java:6674)
	at java.desktop/javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3407)
	at java.desktop/java.awt.Component.processEvent(Component.java:6395)
	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4592)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:743)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

---------------------------------------------------
Build Date: 2024-Jun-14 1025 EDT
Ghidra Version: 11.1.1
Java Home: C:\Program Files\Java\jdk-17
JVM Version: Oracle Corporation 17.0.7
OS: Windows 11 10.0 amd64
Workstation: NANCYBOOK
Data length must be larger than block size
java.lang.Error: Data length must be larger than block size
	at resources.Utils.entropy(Utils.java:20)
	at resources.ColorEntropy.getPoint(ColorEntropy.java:19)
	at resources.ColorSource.point(ColorSource.java:53)
	at resources.MetricMap.drawMap_square(MetricMap.java:475)
	at resources.MetricMap.lambda$draw$0(MetricMap.java:457)
	at java.base/java.lang.Thread.run(Thread.java:833)

---------------------------------------------------
Build Date: 2024-Jun-14 1025 EDT
Ghidra Version: 11.1.1
Java Home: C:\Program Files\Java\jdk-17
JVM Version: Oracle Corporation 17.0.7
OS: Windows 11 10.0 amd64
Workstation: NANCYBOOK

Index 23909 out of bounds for length 23909
java.lang.ArrayIndexOutOfBoundsException: Index 23909 out of bounds for length 23909
	at resources.Color8bpp.getPoint(Color8bpp.java:14)
	at resources.ColorSource.point(ColorSource.java:53)
	at resources.MetricMap.drawMap_square(MetricMap.java:475)
	at resources.MetricMap.lambda$draw$0(MetricMap.java:457)
	at java.base/java.lang.Thread.run(Thread.java:833)

---------------------------------------------------
Build Date: 2024-Jun-14 1025 EDT
Ghidra Version: 11.1.1
Java Home: C:\Program Files\Java\jdk-17
JVM Version: Oracle Corporation 17.0.7
OS: Windows 11 10.0 amd64
Workstation: NANCYBOOK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant