mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-19 03:16:10 +00:00
Add -i Command Line Arg
This commit is contained in:
parent
23e2d5fa9f
commit
bab57dea4d
@ -42,6 +42,11 @@ CutterApplication::CutterApplication(int &argc, char **argv) : QApplication(argc
|
|||||||
QObject::tr("level"));
|
QObject::tr("level"));
|
||||||
cmd_parser.addOption(analOption);
|
cmd_parser.addOption(analOption);
|
||||||
|
|
||||||
|
QCommandLineOption scriptOption("i",
|
||||||
|
QObject::tr("Run script file"),
|
||||||
|
QObject::tr("file"));
|
||||||
|
cmd_parser.addOption(scriptOption);
|
||||||
|
|
||||||
#ifdef CUTTER_ENABLE_JUPYTER
|
#ifdef CUTTER_ENABLE_JUPYTER
|
||||||
QCommandLineOption pythonHomeOption("pythonhome", QObject::tr("PYTHONHOME to use for Jupyter"),
|
QCommandLineOption pythonHomeOption("pythonhome", QObject::tr("PYTHONHOME to use for Jupyter"),
|
||||||
"PYTHONHOME");
|
"PYTHONHOME");
|
||||||
@ -117,6 +122,7 @@ CutterApplication::CutterApplication(int &argc, char **argv) : QApplication(argc
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
options.script = cmd_parser.value(scriptOption);
|
||||||
mainWindow->openNewFile(options, analLevelSpecified);
|
mainWindow->openNewFile(options, analLevelSpecified);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,12 +106,12 @@ void InitialOptionsDialog::loadOptions(const InitialOptions &options)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!options.script.isEmpty()) {
|
if (!options.script.isEmpty()) {
|
||||||
ui->scriptCheckBox->setChecked(false);
|
|
||||||
ui->scriptLineEdit->setText("");
|
|
||||||
ui->analSlider->setValue(0);
|
|
||||||
} else {
|
|
||||||
ui->scriptCheckBox->setChecked(true);
|
ui->scriptCheckBox->setChecked(true);
|
||||||
ui->scriptLineEdit->setText(options.script);
|
ui->scriptLineEdit->setText(options.script);
|
||||||
|
ui->analSlider->setValue(0);
|
||||||
|
} else {
|
||||||
|
ui->scriptCheckBox->setChecked(false);
|
||||||
|
ui->scriptLineEdit->setText("");
|
||||||
}
|
}
|
||||||
|
|
||||||
shellcode = options.shellcode;
|
shellcode = options.shellcode;
|
||||||
|
Loading…
Reference in New Issue
Block a user