First iteration at renaming remains of radare2

This commit is contained in:
xarkes 2020-12-13 10:33:08 +01:00
parent 3b5c6ff9c0
commit 00f6d47357
27 changed files with 59 additions and 59 deletions

View File

@ -76,8 +76,8 @@ ColorThemeWorker::ColorThemeWorker(QObject *parent) : QObject (parent)
} else {
QMessageBox::critical(nullptr,
tr("Standard themes not found"),
tr("The radare2 standard themes could not be found in '%1'. "
"Most likely, radare2 is not properly installed.")
tr("The Rizin standard themes could not be found in '%1'. "
"Most likely, Rizin is not properly installed.")
.arg(currDir.path())
);
}
@ -231,7 +231,7 @@ QJsonDocument ColorThemeWorker::getTheme(const QString& themeName) const
QString ColorThemeWorker::deleteTheme(const QString &themeName) const
{
if (!isCustomTheme(themeName)) {
return tr("You can not delete standard radare2 color themes.");
return tr("You can not delete standard Rizin color themes.");
}
if (!isThemeExist(themeName)) {
return tr("Theme <b>%1</b> does not exist.").arg(themeName);
@ -292,7 +292,7 @@ QString ColorThemeWorker::renameTheme(const QString& themeName, const QString& n
}
if (!isCustomTheme(themeName)) {
return tr("You can not rename standard radare2 themes.");
return tr("You can not rename standard Rizin themes.");
}
QDir dir = customR2ThemesLocationPath;

View File

@ -18,7 +18,7 @@ class ColorThemeWorker : public QObject
Q_OBJECT
public:
/**
* @brief radare2SpecificOptions is list of all available radare2-only color options.
* @brief radare2SpecificOptions is list of all available Rizin-only color options.
*/
const QStringList radare2SpecificOptions = Core()->cmdj("ecj").object().keys();
@ -28,7 +28,7 @@ public:
static const QStringList cutterSpecificOptions;
/**
* @brief radare2UnusedOptions is a list of all radare2 options that Cutter does not use.
* @brief radare2UnusedOptions is a list of all Rizin options that Cutter does not use.
*/
static const QStringList radare2UnusedOptions;

View File

@ -617,7 +617,7 @@ QString Configuration::getConfigString(const QString &key)
/**
* @brief Configuration::setConfig
* Set radare2 configuration value (e.g. "asm.lines")
* Set Rizin configuration value (e.g. "asm.lines")
* @param key
* @param value
*/

View File

@ -138,7 +138,7 @@ public:
const QColor getColor(const QString &name) const;
/**
* @brief Get the value of a config var either from r2 or settings, depending on the key.
* @brief Get the value of a config var either from Rizin or settings, depending on the key.
*/
QVariant getConfigVar(const QString &key);
bool getConfigBool(const QString &key);
@ -146,7 +146,7 @@ public:
QString getConfigString(const QString &key);
/**
* @brief Set the value of a config var either to r2 or settings, depending on the key.
* @brief Set the value of a config var either to Rizin or settings, depending on the key.
*/
void setConfig(const QString &key, const QVariant &value);
bool isFirstExecution();

View File

@ -5,7 +5,7 @@
#include "core/Cutter.h"
/**
* @brief The CommandDescription struct is a pair of a radare2 command and its description
* @brief The CommandDescription struct is a pair of a Rizin command and its description
*/
struct CommandDescription {
QString command;

View File

@ -8,11 +8,11 @@
#include <QVariant>
/**
* @brief Class for temporary modifying r2 `e` configuration.
* @brief Class for temporary modifying Rizin `e` configuration.
*
* Modified values will be restored at the end of scope. This is useful when using a r2 command that can only
* Modified values will be restored at the end of scope. This is useful when using a Rizin command that can only
* be configured using `e` configuration and doesn't accept arguments. TempConfig::set calls can be chained.
* If a command or r2 method accepts arguments directly it is preferred to use those instead of temporary modifying
* If a command or Rizin method accepts arguments directly it is preferred to use those instead of temporary modifying
* global configuration.
*
* \code

View File

@ -194,21 +194,21 @@ void CutterCore::initialize(bool loadPlugins)
#ifdef APPIMAGE
// Executable is in appdir/bin
prefix.cdUp();
qInfo() << "Setting r2 prefix =" << prefix.absolutePath() << " for AppImage.";
qInfo() << "Setting Rizin prefix =" << prefix.absolutePath() << " for AppImage.";
#else // MACOS_RZ_BUNDLED
// Executable is in Contents/MacOS, prefix is Contents/Resources/r2
prefix.cdUp();
prefix.cd("Resources");
qInfo() << "Setting r2 prefix =" << prefix.absolutePath() << " for macOS Application Bundle.";
qInfo() << "Setting Rizin prefix =" << prefix.absolutePath() << " for macOS Application Bundle.";
#endif
setConfig("dir.prefix", prefix.absolutePath());
auto pluginsDir = prefix;
if (pluginsDir.cd("share/rizin/plugins")) {
qInfo() << "Setting r2 plugins dir =" << pluginsDir.absolutePath();
qInfo() << "Setting Rizin plugins dir =" << pluginsDir.absolutePath();
setConfig("dir.plugins", pluginsDir.absolutePath());
} else {
qInfo() << "r2 plugins dir under" << pluginsDir.absolutePath() << "does not exist!";
qInfo() << "Rizin plugins dir under" << pluginsDir.absolutePath() << "does not exist!";
}
#endif
@ -220,7 +220,7 @@ void CutterCore::initialize(bool loadPlugins)
}
// IMPLICIT rz_bin_iobind (core_->bin, core_->io);
// Otherwise r2 may ask the user for input and Cutter would freeze
// Otherwise Rizin may ask the user for input and Cutter would freeze
setConfig("scr.interactive", false);
// Initialize graph node highlighter
@ -643,7 +643,7 @@ bool CutterCore::tryFile(QString path, bool rw)
}
/**
* @brief Maps a file using r2 API
* @brief Maps a file using Rizin API
* @param path Path to file
* @param mapaddr Map Address
* @return bool
@ -3747,7 +3747,7 @@ QString CutterCore::getVersionInformation()
/* ... */
{NULL, NULL}
};
versionInfo.append(QString("%1 r2\n").arg(RZ_GITTAP));
versionInfo.append(QString("%1 rz\n").arg(RZ_GITTAP));
for (i = 0; vcs[i].name; i++) {
struct vcs_t *v = &vcs[i];
const char *name = v->callback ();

View File

@ -58,7 +58,7 @@ public:
/* Core functions (commands) */
static QString sanitizeStringForCommand(QString s);
/**
* @brief send a command to radare2
* @brief send a command to Rizin
* @param str the command you want to execute
* @return command output
* @note if you want to seek to an address, you should use CutterCore::seek.
@ -66,7 +66,7 @@ public:
QString cmd(const char *str);
QString cmd(const QString &str) { return cmd(str.toUtf8().constData()); }
/**
* @brief send a command to radare2 asynchronously
* @brief send a command to Rizin asynchronously
* @param str the command you want to execute
* @param task a shared pointer that will be returned with the R2 command task
* @note connect to the &R2Task::finished signal to add your own logic once
@ -79,7 +79,7 @@ public:
bool asyncCmd(const QString &str, QSharedPointer<R2Task> &task) { return asyncCmd(str.toUtf8().constData(), task); }
/**
* @brief Execute a radare2 command \a cmd. By nature, the API
* @brief Execute a Rizin command \a cmd. By nature, the API
* is executing raw commands, and thus ignores multiple commands and overcome command injections.
* @param cmd - a raw command to execute. Passing multiple commands (e.g "px 5; pd 7 && pdf") will result in them treated as arguments to first command.
* @return the output of the command
@ -92,9 +92,9 @@ public:
QString cmdRaw(const QString &cmd) { return cmdRaw(cmd.toUtf8().constData()); };
/**
* @brief Execute a radare2 command \a cmd at \a address. The function will preform a silent seek to the address
* @brief Execute a Rizin command \a cmd at \a address. The function will preform a silent seek to the address
* without triggering the seekChanged event nor adding new entries to the seek history. By nature, the
* API is executing a single command without going through radare2 shell, and thus ignores multiple commands
* API is executing a single command without going through Rizin shell, and thus ignores multiple commands
* and tries to overcome command injections.
* @param cmd - a raw command to execute. If multiple commands will be passed (e.g "px 5; pd 7 && pdf") then
* only the first command will be executed.
@ -116,14 +116,14 @@ public:
QString cmdTask(const QString &str);
QJsonDocument cmdjTask(const QString &str);
/**
* @brief send a command to radare2 and check for ESIL errors
* @brief send a command to Rizin and check for ESIL errors
* @param command the command you want to execute
* @note If you want to seek to an address, you should use CutterCore::seek.
*/
void cmdEsil(const char *command);
void cmdEsil(const QString &command) { cmdEsil(command.toUtf8().constData()); }
/**
* @brief send a command to radare2 and check for ESIL errors
* @brief send a command to Rizin and check for ESIL errors
* @param command the command you want to execute
* @param task a shared pointer that will be returned with the R2 command task
* @note connect to the &R2Task::finished signal to add your own logic once
@ -238,7 +238,7 @@ public:
/**
* @brief Changes immediate displacement to structure offset
* This function makes use of the "aht" command of r2 to apply structure
* This function makes use of the "aht" command of Rizin to apply structure
* offset to the immediate displacement used in the given instruction
* \param structureOffset The name of struct which will be applied
* \param offset The address of the instruction where the struct will be applied
@ -540,9 +540,9 @@ public:
/**
* @brief Adds new types
* It first uses the rz_parse_c_string() function from radare2 API to parse the
* It first uses the rz_parse_c_string() function from Rizin API to parse the
* supplied C file (in the form of a string). If there were errors, they are displayed.
* If there were no errors, it uses sdb_query_lines() function from radare2 API
* If there were no errors, it uses sdb_query_lines() function from Rizin API
* to save the parsed types returned by rz_parse_c_string()
* \param str Contains the definition of the data types
* \return returns an empty QString if there was no error, else returns the error
@ -624,7 +624,7 @@ public:
/**
* @brief Enable or disable Write mode. When the file is opened in write mode, any changes to it will be immediately
* committed to the file on disk, thus modify the file. This function wrap radare2 function which re-open the file with
* committed to the file on disk, thus modify the file. This function wrap Rizin function which re-open the file with
* the desired permissions.
* @param enabled
*/
@ -688,7 +688,7 @@ signals:
void graphOptionsChanged();
/**
* @brief seekChanged is emitted each time radare2 seek value is modified
* @brief seekChanged is emitted each time Rizin's seek value is modified
* @param offset
*/
void seekChanged(RVA offset);

View File

@ -14,7 +14,7 @@
#undef max
#endif // Q_OS_WIN
// radare2 list iteration macros
// Rizin list iteration macros
#define CutterRListForeach(list, it, type, x) \
if (list) for (it = list->head; it && ((x=static_cast<type*>(it->data))); it = it->n)

View File

@ -265,7 +265,7 @@ void MainWindow::initUI()
readSettings();
// Display tooltip for the Analyze Program action
ui->actionAnalyze->setToolTip("Analyze the program using radare2's \"aaa\" command");
ui->actionAnalyze->setToolTip("Analyze the program using Rizin's \"aaa\" command");
ui->menuFile->setToolTipsVisible(true);
}
@ -1537,7 +1537,7 @@ void MainWindow::on_actionRun_Script_triggered()
dialog.setDirectory(QDir::home());
const QString &fileName = QDir::toNativeSeparators(dialog.getOpenFileName(this,
tr("Select radare2 script")));
tr("Select Rizin script")));
if (fileName.isEmpty()) // Cancel was pressed
return;
@ -1714,7 +1714,7 @@ void MainWindow::on_actionExport_as_code_triggered()
cmdMap[filters.last()] = "pcJ";
filters << tr("Python array (*.py)");
cmdMap[filters.last()] = "pcp";
filters << tr("Print 'wx' r2 commands (*.r2)");
filters << tr("Print 'wx' Rizin commands (*.r2)");
cmdMap[filters.last()] = "pc*";
filters << tr("GAS .byte blob (*.asm, *.s)");
cmdMap[filters.last()] = "pca";

View File

@ -642,7 +642,7 @@
</action>
<action name="actionRun_Script">
<property name="text">
<string>Run radare2 script</string>
<string>Run Rizin script</string>
</property>
</action>
<action name="actionReset_settings">

View File

@ -27,7 +27,7 @@ AboutDialog::AboutDialog(QWidget *parent) :
ui->logoSvgWidget->load(Config()->getLogoFile());
QString aboutString(tr("Version") + " " CUTTER_VERSION_FULL "<br/>"
+ tr("Using r2-") + RZ_GITTAP + "<br/>"
+ tr("Using rizin-") + RZ_GITTAP + "<br/>"
+ buildQtVersionString()
+ "<p><b>" + tr("Optional Features:") + "</b><br/>"
+ QString("Python: %1<br/>").arg(
@ -48,7 +48,7 @@ AboutDialog::AboutDialog(QWidget *parent) :
+ tr("This Software is released under the GNU General Public License v3.0")
+ "<h2>" + tr("Authors") + "</h2>"
+ tr("Cutter is developed by the community and maintained by its core and development teams.<br/>")
+ tr("Check our <a href='https://github.com/radareorg/cutter/graphs/contributors'>contributors page</a> for the full list of contributors."));
+ tr("Check our <a href='https://github.com/rizinorg/cutter/graphs/contributors'>contributors page</a> for the full list of contributors."));
ui->label->setText(aboutString);
QSignalBlocker s(ui->updatesCheckBox);
@ -70,7 +70,7 @@ void AboutDialog::on_buttonBox_rejected()
void AboutDialog::on_showVersionButton_clicked()
{
QMessageBox popup(this);
popup.setWindowTitle(tr("radare2 version information"));
popup.setWindowTitle(tr("Rizin version information"));
popup.setTextInteractionFlags(Qt::TextSelectableByMouse);
auto versionInformation = Core()->getVersionInformation();
popup.setText(versionInformation);

View File

@ -105,7 +105,7 @@
</sizepolicy>
</property>
<property name="text">
<string>Show radare2 plugin information</string>
<string>Show Rizin plugin information</string>
</property>
</widget>
</item>
@ -118,7 +118,7 @@
</sizepolicy>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:11pt; font-weight:600;&quot;&gt;Cutter is a free and open-source reverse engineering platform powered by radare2&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;Read more on &lt;/span&gt;&lt;a href=&quot;https://cutter.re&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#2980b9;&quot;&gt;cutter.re&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:11pt; font-weight:600;&quot;&gt;Cutter is a free and open-source reverse engineering platform powered by Rizin&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;Read more on &lt;/span&gt;&lt;a href=&quot;https://cutter.re&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#2980b9;&quot;&gt;cutter.re&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>

View File

@ -426,7 +426,7 @@ void InitialOptionsDialog::updateScriptLayout()
void InitialOptionsDialog::on_scriptSelectButton_clicked()
{
QFileDialog dialog(this);
dialog.setWindowTitle(tr("Select radare2 script file"));
dialog.setWindowTitle(tr("Select Rizin script file"));
dialog.setNameFilters({ tr("Script file (*.r2)"), tr("All files (*)") });
if (!dialog.exec()) {

View File

@ -67,7 +67,7 @@ private:
/**
* @brief setTooltipWithConfigHelp is an helper function that add a tolltip to a widget with
* a description of a given radare2 eval config.
* a description of a given Rizin eval config.
* @param w - a widget to which to add the tooltip
* @param config - name of a configuration variable such as "asm.bits".
*/

View File

@ -805,7 +805,7 @@
<item>
<widget class="QLineEdit" name="scriptLineEdit">
<property name="placeholderText">
<string>Path to radare2 script file</string>
<string>Path to Rizin script file</string>
</property>
</widget>
</item>

View File

@ -94,7 +94,7 @@ QString LinkTypeDialog::findLinkedType(RVA address)
}
// Extract the given type from returned data
// TODO: Implement "tlsj" in radare2 or some other function to directly get linked type
// TODO: Implement "tlsj" in Rizin or some other function to directly get linked type
QString s = ret.section(QLatin1Char('\n'), 0, 0);
return s.mid(1, s.size() - 2);
}

View File

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>radare2 plugin information</string>
<string>Rizin plugin information</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_1">
<item>

View File

@ -43,7 +43,7 @@ AnalOptionsWidget::AnalOptionsWidget(PreferencesDialog *dialog)
connect(confCheckbox.checkBox, &QCheckBox::stateChanged, this, [this, val, &cb]() { checkboxEnabler(&cb, val); });
}
ui->analyzePushButton->setToolTip("Analyze the program using radare2's \"aaa\" command");
ui->analyzePushButton->setToolTip("Analyze the program using Rizin's \"aaa\" command");
auto *mainWindow = new MainWindow(this);
connect(ui->analyzePushButton, &QPushButton::clicked, mainWindow,
&MainWindow::on_actionAnalyze_triggered);

View File

@ -51,7 +51,7 @@ PluginsOptionsWidget::PluginsOptionsWidget(PreferencesDialog *dialog)
auto r2PluginsButton = new QPushButton(this);
layout->addWidget(r2PluginsButton);
r2PluginsButton->setText(tr("Show radare2 plugin information"));
r2PluginsButton->setText(tr("Show Rizin plugin information"));
connect(r2PluginsButton, &QPushButton::clicked, this, [this]() {
R2PluginsDialog dialog(this);
dialog.exec();

View File

@ -170,11 +170,11 @@ private:
bool isFunctionVariable();
/**
* @brief Check if the function variable annotated by annotationHere is
* present in radare2.
* present in Rizin.
*
* @return True if the variable is present, otherwise false
*/
bool variablePresentInR2();
};
#endif // DECOMPILERCONTEXTMENU_H
#endif // DECOMPILERCONTEXTMENU_H

View File

@ -522,7 +522,7 @@ void DisassemblyContextMenu::aboutToShowSlot()
structureOffsetMenu->clear();
// Get the possible offsets using the "ahts" command
// TODO: add ahtj command to radare2 and then use it here
// TODO: add ahtj command to Rizin and then use it here
QStringList ret = Core()->cmdList("ahts " + memDisp.toString());
for (const QString &val : ret) {
if (val.isEmpty()) {

View File

@ -4,11 +4,11 @@
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0</project_license>
<name>Cutter</name>
<summary>A Qt and C++ GUI for radare2 reverse engineering framework</summary>
<summary>Free and Open Source Reverse Engineering Platform powered by Rizin and Qt</summary>
<description>
<p>
Cutter is a free and open-source GUI for radare2. Willing to create an advanced, customizable and free reverse engineering framework.
Cutter is a free and open-source GUI for Rizin. Willing to create an advanced, customizable and free reverse engineering framework.
</p>
</description>
@ -16,7 +16,7 @@
<screenshots>
<screenshot>
<image>https://raw.githubusercontent.com/radareorg/cutter/master/docs/source/images/screenshot.png</image>
<image>https://raw.githubusercontent.com/rizinorg/cutter/master/docs/source/images/screenshot.png</image>
<caption>Main UI</caption>
</screenshot>
</screenshots>

View File

@ -98,7 +98,7 @@ private:
/**
* @brief List entry below a class
*
* This roughly corresponds to attributes of r2 analysis classes, which means it is not an attribute in the sense of
* This roughly corresponds to attributes of Rizin analysis classes, which means it is not an attribute in the sense of
* a class member variable, but any kind of sub-info associated with the class.
* This struct in particular is used to provide a model for the list entries below a class.
*/

View File

@ -14,7 +14,7 @@ public:
/**
* @brief setShowOnlyCustom sets whether or not combobox should contain only
* custom themes (created by user or imported) or custom and srandard radare2 themes.
* custom themes (created by user or imported) or custom and srandard rizin themes.
*/
void setShowOnlyCustom(bool value);

View File

@ -404,7 +404,7 @@ QJsonDocument ColorSettingsModel::getTheme() const
const QMap<QString, OptionInfo> optionInfoMap__ = {
{
"comment", {
QObject::tr("Color of comment generated by radare2"),
QObject::tr("Color of comment generated by Rizin"),
QObject::tr("Comment")
}
},

View File

@ -87,7 +87,7 @@ private slots:
/**
* @brief Executed on clicking the Export Types option in the context menu
* It shows the user a file dialog box to select a file where the types
* will be exported. It uses the "tc" command of radare2 to export the types.
* will be exported. It uses the "tc" command of Rizin to export the types.
*/
void on_actionExport_Types_triggered();