archive: add 5 repo prompt(s) [skip ci]

This commit is contained in:
github-actions[bot]
2026-02-24 13:41:49 +00:00
parent 9fed3acb2a
commit ffe0dfe0c0
5 changed files with 14218 additions and 0 deletions
+201
View File
@@ -0,0 +1,201 @@
Project Path: arc_Ahmadmansoor_x64dbgScript_w7z6ip5t
Source Tree:
```txt
arc_Ahmadmansoor_x64dbgScript_w7z6ip5t
├── README.md
├── Sample
│ ├── Export Fun_cmt from ida to x64dbg
│ │ ├── export_Func_cmt.py
│ │ ├── readme.md
│ │ └── script.txt
│ ├── Search for Sequence of commands
│ │ └── Script.txt
│ ├── Use Global Variable too Run Multipal Script
│ │ ├── Execute multiple commands.jpg
│ │ ├── Main.txt
│ │ └── stepMe.txt
│ └── test
│ └── screen.jpg
├── manual.pdf
├── v1.0
│ ├── Plugin_XP.zip
│ ├── plugins_x32.zip
│ ├── pluginsx_x64.zip
│ └── x64dbgScript v1.0.zip
├── v2.0
│ ├── X64dbgScript plugin v2.jpg
│ └── v2.0.zip
└── v2.5
├── X64dbgScript plugin.pdf
├── plugins 2.5.zip
└── readme.md
```
`README.md`:
```md
# x64dbg
This is just a x64dbg script system support.
on youtube:
Export Functions Comments Labels from IDA inside x64dbg.
https://youtu.be/PE1RgHLpWC8
Use Global Variable too Run Multipal Script
https://youtu.be/WlfqNp7E650
![manual_Page_1](https://user-images.githubusercontent.com/7176580/158775845-9c440394-15f8-4488-a700-ae7bb3f47122.jpg)
![manual_Page_2](https://user-images.githubusercontent.com/7176580/158775852-2f5e0477-6f2c-449c-b86f-1ee5c4419683.jpg)
![manual_Page_3](https://user-images.githubusercontent.com/7176580/158775854-ab131a24-0dde-4745-9c01-a65f2b4a9648.jpg)
![manual_Page_4](https://user-images.githubusercontent.com/7176580/158775856-3acce673-5406-4a59-a76f-5d70aa3ed686.jpg)
![manual_Page_5](https://user-images.githubusercontent.com/7176580/158775858-adb6ed08-34b9-422a-9fb6-c71eb71e771e.jpg)
![manual_Page_6](https://user-images.githubusercontent.com/7176580/158775862-7c2aa14e-725a-4cd8-a7b9-6ebcade5fcab.jpg)
```
`Sample/Export Fun_cmt from ida to x64dbg/export_Func_cmt.py`:
```py
import idautils
import idaapi
ea = BeginEA()
module =idaapi.get_root_filename()
imagebase = idaapi.get_imagebase()
f = open("D:\\Func.txt", "w+")
# here we will export all functions name and (start,End)
for funcea in Functions(SegStart(ea), SegEnd(ea)):
functionName = GetFunctionName(funcea)
functionStart = "0x%08x"% (funcea - idaapi.get_imagebase())
functionEnd = "0x%08x"%( idc.find_func_end(funcea) - idaapi.get_imagebase())
print functionName,functionStart,functionEnd
output="lable"+";" + functionName+";" + functionStart + ";" + functionEnd + "\n"
f.write(output)
# here we will export all comments
for function in idautils.Functions():
for address in idautils.FuncItems(function):
if idc.get_cmt(address,0) is not None:
output= "comments"+";" + idc.get_cmt(address,0) + ";" + "0x%08x"%(address-imagebase) +";" + "none" + "\n"
print (output)
f.write(output)
if idc.get_cmt(address,1) is not None:#
output= "comments"+";" + idc.get_cmt(address,0) + ";" + "0x%08x"%(address-imagebase) +";" + "none" + "\n"
print (output)
f.write(output)
f.close()
```
`Sample/Export Fun_cmt from ida to x64dbg/readme.md`:
```md
watch the move on
https://youtu.be/TbbBPPh-vf4
Export Functions Comments Labels from IDA inside x64dbg
using x64dbgScript plugins
```
`Sample/Export Fun_cmt from ida to x64dbg/script.txt`:
```txt
strarr re[1] // this will used to fill data from ReadFile function it will resized auto
strarr r[4] // this will fill the strcture of the Func.txt
re=ReadFile 'D:\Func.txt'
int i,0 // counter for loop
logs $mod.main() // will log base address of the main module
if.1 i<$ArrayLen(re) // now will check if i reach array length
strAlign {r[0],r[1],r[2],r[3]},re[i],';' // check manual this will devide string by seperator ;
//in case functions r[0] lable; r[1]lablename; r[2] FunctionBeginAddress; r[3] FunctionEndAddress
if.2 r[0]=='lable'
r[2]=r[2]+$mod.main()
r[3]=r[3]+$mod.main() -1 // -1 IDA is end func at the begin in next function
functionadd r[2],r[3]
labelset r[2],r[1]
logs 'function' + r[2] + ' add at : ' + r[1]
End.2
// in case comments r[0] comments; r[1] text comments ; r[2] comments Address
if.4 r[0]=='comments'
r[2]=r[2] +$mod.main()
commentset r[2],r[1]
logs 'commentset ' + r[2] +' add at ' + r[1]
End.4
i=i+1
repeat.1
End.1
ret
```
`Sample/Search for Sequence of commands/Script.txt`:
```txt
strarr cmds[3]
str lineaddr
cmds[0]='mov qword ptr ds:[rbx], rcx'
cmds[1]='lea rdx,qword ptr ds:[rbx+8]'
cmds[2]='xor ecx,ecx'
strarr res[1]
hex Nextaddr
int count,0
res=findasm cmds[0]
int i,0
if.1 i < $ArrayLen(res)
Nextaddr=res[i]+$dis.len(res[i])
if.2 cmds[1]==$DisAt(Nextaddr)
Nextaddr=Nextaddr +$dis.len(Nextaddr)
//logs Nextaddr
if.3 cmds[2]==$DisAt(Nextaddr)
logs 'Found at: ' + res[i]
count=count+1
End.3
End.2
i=i+1
repeat.1
End.1
logs 'result count is :' + count
ret
```
`Sample/Use Global Variable too Run Multipal Script/Main.txt`:
```txt
int stepCount,4 // this will be global variable will used in other script stepMe
int FinishScript,0 // same as above
bp 2E26 + $mod.main() // set BP where we want to finish
bp 2E0F +$mod.main() // set BP at 00000000FFCE2E04 | 0F85 164B0 | jne notepad.FFCE7920 |
SetBreakpointCommand 2E0F +$mod.main(),'"Call stepMe"' // set command at BP
run
if.1 CIP !=2E26 + $mod.main()
if.2 FinishScript==1 // to check if the script finish
FinishScript=0
run
End.2
repeat.1
End.1
logs 'we reach where we want to stop' + 'RAX=' + RAX
ret
```
`Sample/Use Global Variable too Run Multipal Script/stepMe.txt`:
```txt
int instLength,0
stepCount=stepCount-1
logs stepCount
if.1 stepCount!=0 // this will check if we pass 4 time and then no more set BP
instLength=$dis.len(CIP) // measure cmd length so we will set BP after
bp CIP + instLength // set BP at next instraction
SetBreakpointCommand CIP + instLength,'"Call stepMe"'
logs 'RAX=' + RAX
End.1
bpc CIP // remove current BP
FinishScript=1
//run
ret
```
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+254
View File
@@ -0,0 +1,254 @@
Project Path: arc_x64dbg_x64dbgbinja_9u6st9rh
Source Tree:
```txt
arc_x64dbg_x64dbgbinja_9u6st9rh
├── LICENSE
├── README.md
├── __init__.py
└── plugin.json
```
`LICENSE`:
```
MIT License
Copyright (c) 2026 x64dbg
Permission 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:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE 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.
```
`README.md`:
```md
# x64dbgbinja
Official x64dbg plugin for [Binary Ninja](https://binary.ninja).
## Installation
From the Plugins Menu, select "Manage Plugins". Search for "x64dbgbinja" and click the "Install" button.
## Menu options
### Import database
Import comments/labels from an uncompressed x64dbg JSON database in Binary Ninja.
Symbols for imported functions and or library functions can be overwritten via the "Overwrite X" entries in Settings.
### Export database
Export comments/labels to a JSON database that can be loaded by x64dbg.
To export labels only: uncheck "Export Comments" under "x64dbg Database Export" in Settings.
```
`__init__.py`:
```py
"""Binary Ninja plugin to import and export symbols and comments to x64dbg database format."""
import json
import pathlib
from binaryninja.enums import SymbolType
from binaryninja.interaction import get_save_filename_input, get_open_filename_input
from binaryninja.log import Logger
from binaryninja.plugin import PluginCommand
from binaryninja.settings import Settings
logger = Logger(0, 'x64dbgbinja')
s = Settings()
s.register_group('dd', 'x64dbg Database Export')
setting = {
'description': 'Always export comments to the x64dbg database.',
'title': 'Export Comments',
'default': True,
'type': 'boolean'
}
s.register_setting('dd.comments', json.dumps(setting))
setting = {
'description': 'Overwrite LibraryFunctionSymbol name',
'title': 'Overwrite LibraryFunctionSymbol',
'default': False,
'type': 'boolean'
}
s.register_setting('dd.libfs', json.dumps(setting))
setting = {
'description': 'Overwrite ImportedFunctionSymbol name',
'title': 'Overwrite ImportedFunctionSymbol',
'default': False,
'type': 'boolean'
}
s.register_setting('dd.impfs', json.dumps(setting))
def export_db(bv):
"""Export symbols and optionally comments from Binary Ninja to an x64dbg database."""
db = dict()
module = pathlib.Path(get_filename(bv))
outpath = bv.file.database.globals.get('x64dbg_db_save_path', pathlib.Path(bv.file.filename).parent)
dbext = 'dd{}'.format(bv.arch.address_size * 8)
if not (f := get_save_filename_input('Export database', f'*.{dbext}', f'{outpath}/{module.stem}.{dbext}')):
return
file = pathlib.Path(f)
logger.log_info(f'Exporting database: {file}')
# Export symbols to x64dbg labels
db['labels'] = [
{
'text': symbol.name,
'manual': not symbol.auto,
'module': module.name.lower(),
'address': '0x{:X}'.format(symbol.address - bv.start)
}
for symbol in bv.get_symbols()
]
logger.log_debug('Label(s) exported: {}'.format(len(db['labels'])))
s = Settings()
if s.get_bool('dd.comments'):
db['comments'] = [
{
'text': func.comments[address].replace('{', '{{').replace('}', '}}'),
'manual': True,
'module': module.name.lower(),
'address': '0x{:X}'.format(address - bv.start)
}
for func in bv.functions for address in func.comments
]
logger.log_debug('Comment(s) exported: {}'.format(len(db['comments'])))
file.write_text(json.dumps(db))
bv.file.database.write_global('x64dbg_db_save_path', str(file.parent))
logger.log_info('Done!')
def import_db(bv):
"""Import x64dbg database to Binary Ninja."""
module = pathlib.Path(get_filename(bv)).name.lower()
if not (f := get_open_filename_input('Import database', '*.dd{}'.format(bv.arch.default_int_size * 8))):
return
file = pathlib.Path(f)
logger.log_info(f'Importing database: {file}')
db = json.load(file.open())
count = 0
labels = db.get('labels', list())
with bv.bulk_modify_symbols():
for label in labels:
if label['module'] != module:
continue
address = int(label['address'], 16) + bv.start
if not (func := bv.get_function_at(address)):
continue
if func.name == label['text']:
continue
if func.symbol.type is SymbolType.LibraryFunctionSymbol and not s.get_bool('dd.libfs'):
continue
if func.symbol.type is SymbolType.ImportedFunctionSymbol and not s.get_bool('dd.impfs'):
continue
func.name = label['text']
count += 1
logger.log_debug('Label(s) imported: {}/{}'.format(count, len(labels)))
count = 0
comments = db.get('comments', list())
for comment in comments:
if comment['module'] != module:
continue
address = int(comment['address'], 16) + bv.start
for func in bv.get_functions_containing(address):
func.set_comment_at(address, comment['text'])
count += 1
logger.log_debug('Comment(s) imported: {}/{}'.format(count, len(comments)))
logger.log_info('Done!')
def get_filename(bv):
"""Returns the original filename for the current view."""
if bv.project is not None:
return get_filename_for_project_file(bv, bv.file.original_filename)
return bv.file.original_filename
def get_filename_for_project_file(bv, project_file_name):
"""Returns the original filename of a project file"""
for file in bv.project.files:
if file.path_on_disk == project_file_name:
return file.name
return None
def is_valid(bv):
"""Determine if this is the correct arch."""
if not bv.file.database:
return False
if bv.arch:
return 'x86' in bv.arch.name
else:
return False
PluginCommand.register('x64dbg\\Export database', 'Export x64dbg database', export_db, is_valid)
PluginCommand.register('x64dbg\\Import database', 'Import x64dbg database', import_db, is_valid)
```
`plugin.json`:
```json
{
"pluginmetadataversion": 2,
"name": "x64dbgbinja",
"author": "x64dbg",
"type": [
"sync"
],
"api": [
"python3"
],
"description": "Official x64dbg plugin for Binary Ninja.",
"longdescription": "# x64dbgbinja\n\nOfficial x64dbg plugin for [Binary Ninja](https://binary.ninja).\n\n## Installation\n\nFrom the Plugins Menu, select \"Manage Plugins\". Search for \"x64dbgbinja\" and click the \"Install\" button.\n\n## Menu options\n\n### Import database\n\nImport comments/labels from an uncompressed x64dbg JSON database in Binary Ninja.\n\nSymbols for imported functions and or library functions can be overwritten via the \"Overwrite X\" entries in Settings.\n\n### Export database\n\nExport comments/labels to a JSON database that can be loaded by x64dbg.\n\nTo export labels only: uncheck \"Export Comments\" under \"x64dbg Database Export\" in Settings.\n",
"license": {
"name": "MIT",
"text": "MIT License\n\nCopyright (c) 2026 x64dbg\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
},
"platforms": [
"Darwin",
"Windows",
"Linux"
],
"version": "2.0.9",
"minimumBinaryNinjaVersion": 6455
}
```