Vector35 / community-plugins

Repository for community provided Binary Ninja plugins
MIT License
411 stars 32 forks source link

[NewPlugin] CyShell MemoryLayoutLoader 1.0 #189

Closed CySHell closed 1 year ago

CySHell commented 2 years ago

Please add my plugin to the repository.

Yes, I've read the instructions, especially the part about creating an actual release and creating the tag.

I either used the UI, or the hub command to create a real release.

Author: CyShell Repo name: ClassyPP Release: 1.0

psifertex commented 2 years ago

Unfortunately it looks like there's some invalid json in your plugin.json. From attempting to run the parser (generate-index in this repo):

[5](https://github.com/Vector35/community-plugins/runs/7343351969?check_suite_focus=true#step:5:6)
  File "generate_index.py", line 268, in <module>
[6](https://github.com/Vector35/community-plugins/runs/7343351969?check_suite_focus=true#step:5:7)
    main()
[7](https://github.com/Vector35/community-plugins/runs/7343351969?check_suite_focus=true#step:5:8)
  File "generate_index.py", line 189, in main
[8](https://github.com/Vector35/community-plugins/runs/7343351969?check_suite_focus=true#step:5:9)
    listing = json.load(open(args.listing, "r", encoding="utf-8"))
[9](https://github.com/Vector35/community-plugins/runs/7343351969?check_suite_focus=true#step:5:10)
  File "/usr/lib/python3.8/json/__init__.py", line 293, in load
[10](https://github.com/Vector35/community-plugins/runs/7343351969?check_suite_focus=true#step:5:11)
    return loads(fp.read(),
[11](https://github.com/Vector35/community-plugins/runs/7343351969?check_suite_focus=true#step:5:12)
  File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
[12](https://github.com/Vector35/community-plugins/runs/7343351969?check_suite_focus=true#step:5:13)
    return _default_decoder.decode(s)
[13](https://github.com/Vector35/community-plugins/runs/7343351969?check_suite_focus=true#step:5:14)
  File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
[14](https://github.com/Vector35/community-plugins/runs/7343351969?check_suite_focus=true#step:5:15)
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
[15](https://github.com/Vector35/community-plugins/runs/7343351969?check_suite_focus=true#step:5:16)
  File "/usr/lib/python3.8/json/decoder.py", line 353, in raw_decode
[16](https://github.com/Vector35/community-plugins/runs/7343351969?check_suite_focus=true#step:5:17)
    obj, end = self.scan_once(s, idx)
[17](https://github.com/Vector35/community-plugins/runs/7343351969?check_suite_focus=true#step:5:18)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 6 column 3 (char 78)

python -m json.tool <plugin.json Is a good sanity test to make sure it's at least valid json.

psifertex commented 2 years ago

Also note that after you update the file you'll have to do another release. You might https://github.com/Vector35/release_helper useful.

CySHell commented 2 years ago

I tried both json.tool and json.load() on my json and it is valid... no idea why it fails for you...

`In [2]: json.load(open(r'C:\Binary Ninja\plugins\MemoryLayoutLoader\plugin.json', "r")) Out[2]: {'pluginmetadataversion': 2, 'name': 'MemoryLayoutLoader', 'type': ['binaryview'], 'api': ['python3'], 'description': 'Load a raw file into the current memory space.', 'longdescription': '', 'license': {'name': 'MIT', 'text': 'Copyright (c) 2022 CyShell\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.'}, 'platforms': ['Windows'], 'installinstructions': {'Windows': 'See https://github.com/CySHell/MemoryLayoutLoader'}, 'dependencies': {'pip': [''], 'apt': [], 'installers': [], 'other': ['']}, 'version': '1.0.0', 'author': 'CyShell', 'minimumbinaryninjaversion': 3233}

In [3]:`

psifertex commented 1 year ago

Ugh, my apologies. I made a typo, not you. 🤦‍♂️

Very sorry about that. Should be added shortly.

psifertex commented 1 year ago

Done.