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
hope to have command to save log, not only GUI #2961
Comments
Yes, this would be a very helpful feature! Log control commands:
The first one would be the must have, and the second and third are nice to haves. |
Well this cound be implement by writing a plugin. x64dbg provide |
I could swear there is some kind of API for this, but I don’t remember… why
do you need this functionality? It might be easier to have a command that
appends to a custom log file…
…On Fri, 28 Oct 2022 at 09:30, ElvisBlue ***@***.***> wrote:
Well this cound be implement by writing a plugin. x64dbg provide
_plugin_registercommand API to add your custom command.
—
Reply to this email directly, view it on GitHub
<#2961 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AASYFGOJQ62GEUVKK5FZ5WTWFN6IJANCNFSM6AAAAAARGQHKFY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
The use case here is in a script. At the end of the script, it would be very useful to be able to run The two nice to haves:
Yes, having |
The log redirection and saving doesn't have an external API yet, mostly because it is handled by GUI, not DBG. |
I asked ChatGPT to write this plugin. Does this look correct? #include <cstdio>
#include <cstring>
#include "x64dbg.h"
// Plugin information
const char* plugin_name = "Log to File";
const char* plugin_version = "1.0.0";
// Console command to enable logging to a file
void cmd_logtofile(int argc, char* argv[])
{
// Check if the correct number of arguments was provided
if (argc != 2)
{
dputs("Usage: logtofile [filename]");
return;
}
// Get the filename from the command arguments
const char* filename = argv[1];
// Open the file for writing
FILE* file = fopen(filename, "w");
if (!file)
{
dprintf("Failed to open file %s for writing\n", filename);
return;
}
// Enable logging to the file
GuiSetLogFile(file);
dprintf("Logging enabled to file %s\n", filename);
}
// Initialize the plugin
extern "C" __declspec(dllexport) bool pluginit(PLUG_INITSTRUCT* initStruct)
{
// Register the console command
plugin_registercommand(plugin_name, "logtofile", cmd_logtofile);
// Return success
return true;
}
// Plugin cleanup
extern "C" __declspec(dllexport) bool plugstop()
{
// Return success
return true;
}
// Plugin information
extern "C" __declspec(dllexport) char* plugin_info()
{
// Format the plugin information string
static char info[256];
sprintf_s(info, "%s v%s by %s", plugin_name, plugin_version, "Assistant");
// Return the plugin information
return info;
} |
There's no I think the main issue is to provide a signal of It doesn't look to be very hard to do, @mrexodia is there a new contributing doc? I found the one from readme and wiki is returning 404. Or can I follow the compile instructions in wiki pages (which is still VS2013 and QT5.6.3)? |
Thanks for the heads-up, I moved the contributing document to the |
Feature type
Other
Describe the feature
As command can help for third-party programme transfer
The text was updated successfully, but these errors were encountered: