Commit c7ddaa62 authored by dmknght's avatar dmknght

Sync the source version of Debian team

parent 1798d575
Pipeline #1254 canceled with stages
radare2-cutter (1.10.1-parrot6) rolling-testing; urgency=medium
radare2-cutter (1.10.2-1) unstable; urgency=medium
* debian/control: Bump Standards-Version: to 4.5.0. No changes needed.
* debian/control: Add myself to Uploaders field.
* New upstream version 1.10.2
-- Vangelis Mouhtsis <vangelis@gnugr.org> Mon, 09 Mar 2020 18:02:23 +0200
-- Robert Haist <rha@debian.org> Tue, 10 Mar 2020 11:16:27 +0100
radare2-cutter (1.10.1-parrot6) rolling-testing; urgency=medium
radare2-cutter (1.10.1-3) unstable; urgency=medium
* Update source code to 09/03/2020 to fix compatible with r2 4.3.1
* d/control: make supported architectures explicit
* d/rules: set MAKE_BUILD_TYPE to remove debug fuzz
* d/rules: export harding flags like suggested in the docs
* d/rules: make crash reports opt-in (privacy)
-- dmknght <dmknght@parrotsec.org> Mon, 09 Mar 2020 21:20:33 +0700
-- Robert Haist <rha@debian.org> Thu, 27 Feb 2020 14:20:23 +0100
radare2-cutter (1.10.1-parrot5) rolling-testing; urgency=medium
radare2-cutter (1.10.1-2) unstable; urgency=medium
* Remove todo in debian/rules
* Trigger build for radare2 4.3.1 backend
* d/control: Add dh-strip-nondeterminism to build reproducible
* d/control: Point to the correct Cutter website (Closes: #921391)
* This release and libradare2 in sid closes: #931172
-- Nong Hoang "DmKnght" Tu <dmknght@parrotsec.org> Fri, 06 Mar 2020 11:40:12 +0700
-- Robert Haist <rha@debian.org> Wed, 26 Feb 2020 12:51:37 +0100
radare2-cutter (1.10.1-parrot4) rolling-testing; urgency=medium
radare2-cutter (1.10.1-1) unstable; urgency=medium
* Add libgraphviz-dev build-dep.
* Add libkf5syntaxhighlighting-dev build-dep.
* Add libgvc6 and libgvc6-plugins-gtk build.dep.
[ Hilko Bengen ]
* New upstream version 1.8.0
* New upstream version 1.8.1
-- Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org> Tue, 18 Feb 2020 02:22:53 +0100
[ Samuel Henrique ]
* Add salsa-ci.yml
* Configure git-buildpackage for Debian
radare2-cutter (1.10.1-parrot3) rolling-testing; urgency=medium
[ Robert Haist ]
* New upstream version 1.10.1
* Added python support
* Added syntax highlighting support
* Added graphviz support
* Bump standards version
* Move to debhelper-compat
* Add meson build dependency.
-- Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org> Mon, 17 Feb 2020 21:16:33 +0100
radare2-cutter (1.10.1-parrot2) rolling-testing; urgency=medium
* Update python dependencies.
-- Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org> Mon, 17 Feb 2020 18:44:48 +0100
radare2-cutter (1.10.1-parrot1) rolling-testing; urgency=medium
* Rebuild package.
-- Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org> Sun, 16 Feb 2020 18:41:56 +0100
radare2-cutter (1.10.1-parrot0) unstable; urgency=medium
* Upgrade to 1.10.1
-- DmKnght (Dev Team Member) <dmknght@parrotsec.org> Sun, 02 Feb 2020 14:40:41 +0700
radare2-cutter (1.10.0-parrot0) unstable; urgency=medium
* Upgrade to 1.10.0 with debugger
-- DmKnght (Dev Team Member) <dmknght@parrotsec.org> Mon, 23 Dec 2019 20:19:02 +0700
radare2-cutter (1.9.0-parrot9) unstable; urgency=medium
* Add debugger
-- DmKnght (Dev Team Member) <dmknght@parrotsec.org> Sun, 15 Dec 2019 00:15:01 +0700
radare2-cutter (1.9.0-parrot8) unstable; urgency=medium
* Update 1.9.0 + 14/12/2019
-- DmKnght (Dev Team Member) <dmknght@parrotsec.org> Sat, 14 Dec 2019 10:59:53 +0700
radare2-cutter (1.9.0-parrot7) unstable; urgency=medium
* Fix Strings widget
-- DmKnght (Dev Team Member) <dmknght@parrotsec.org> Sun, 24 Nov 2019 21:49:22 +0700
radare2-cutter (1.9.0-parrot6) unstable; urgency=medium
* update 1.9.0 + 23/11/2019
-- DmKnght (Dev Team Member) <dmknght@parrotsec.org> Sat, 23 Nov 2019 17:09:20 +0700
radare2-cutter (1.9.0-parrot5) unstable; urgency=medium
* Update 1.9.0 + 17/11/2019
-- DmKnght (Dev Team Member) <dmknght@parrotsec.org> Sun, 17 Nov 2019 20:01:52 +0700
radare2-cutter (1.9.0-parrot4) unstable; urgency=medium
* Update version Oct 22
-- DmKnght (Dev Team Member) <dmknght@parrotsec.org> Sat, 02 Nov 2019 08:41:28 +0700
radare2-cutter (1.9.0-parrot3) unstable; urgency=medium
* Update version Oct 19
-- DmKnght (Dev Team Member) <dmknght@parrotsec.org> Sat, 19 Oct 2019 21:06:33 +0700
radare2-cutter (1.9.0-parrot2) unstable; urgency=medium
* Update yara format
-- DmKnght (Dev Team Member) <dmknght@parrotsec.org> Tue, 08 Oct 2019 21:47:00 +0700
radare2-cutter (1.9.0-parrot1) unstable; urgency=medium
* Fix crash when using graph shortcut and enable python plugin
-- DmKnght (Dev Team Member) <dmknght@parrotsec.org> Sun, 29 Sep 2019 00:02:13 +0700
radare2-cutter (1.9.0-parrot0) unstable; urgency=medium
* Update cutter-1.9
-- DmKnght (Dev Team Member) <dmknght@parrotsec.org> Sat, 21 Sep 2019 19:59:30 +0700
radare2-cutter (1.8.3-parrot2) unstable; urgency=medium
* Update to Aug 31
* Disassembler and Pseudo-code real time stream
-- DmKnght (Dev Team Member) <dmknght@parrotsec.org> Sat, 31 Aug 2019 20:53:23 +0700
radare2-cutter (1.8.3-parrot1) unstable; urgency=medium
* Update to Jul 14 git version
-- dmknght (Space Cadets Member) <dmknght@protonmail.com> Sun, 14 Jul 2019 14:24:34 +0700
radare2-cutter (1.8.3) unstable; urgency=medium
* Update to 1.8.3 and Jul 10 git version
-- dmknght (Space Cadets Member) <dmknght@protonmail.com> Wed, 10 Jul 2019 20:06:03 +0700
-- Robert Haist <rha@debian.org> Tue, 18 Feb 2020 23:02:09 +0100
radare2-cutter (1.7.4-2) unstable; urgency=medium
......
Source: radare2-cutter
Section: devel
Priority: optional
Maintainer: Parrot Dev Team <team@parrotsec.org>
Uploaders: Nong Hoang "DmKnght" Tu <dmknght@parrotsec.org>,
Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org>,
Vangelis Mouhtsis <gnugr@parrotsec.org>,
Build-Depends: build-essential,
cmake,
debhelper (>= 12),
pkg-config,
python3-dev,
qt5-qmake,
qtbase5-dev,
qtwebengine5-dev,
libkf5syntaxhighlighting-dev,
libgvc6,
libgvc6-plugins-gtk,
Maintainer: Debian Security Tools <team+pkg-security@tracker.debian.org>
Uploaders: Sebastian Reichel <sre@debian.org>, Robert Haist <rha@debian.org>
Build-Depends: cmake,
debhelper-compat (= 12),
dh-strip-nondeterminism,
libcapstone-dev,
libgraphviz-dev,
libzip-dev,
libkf5syntaxhighlighting-dev,
libqt5svg5-dev,
libcapstone-dev,
libradare2-dev,
zlib1g-dev,
libxxhash-dev,
shiboken2,
radare2,
g++,
gcc,
meson,
libzip-dev,
pkg-config,
python3-dev,
qtbase5-dev,
qtwebengine5-dev,
zlib1g-dev
Standards-Version: 4.5.0
Homepage: https://www.radare.org
Vcs-Browser: https://nest.parrot.sh/packages/tools/radare2-cutter
Vcs-Git: https://nest.parrot.sh/packages/tools/radare2-cutter.git
Rules-Requires-Root: no
Homepage: https://cutter.re
Vcs-Browser: https://salsa.debian.org/pkg-security-team/radare2-cutter
Vcs-Git: https://salsa.debian.org/pkg-security-team/radare2-cutter.git
Package: radare2-cutter
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends},
python3.7,
Architecture: amd64 arm64 armhf i386 mipsel
Depends: python3,
python3-ipykernel,
python3-jupyter-client,
python3-notebook,
python3-ipykernel,
python3-zmq,
libgraphviz-dev,
libshiboken2-dev,
libpyside2-dev,
libkf5syntaxhighlighting-dev,
libpython3.8-dev,
${misc:Depends},
${shlibs:Depends}
Description: GUI for radare2 reverse engineering framework
Cutter is a Qt based GUI for reverse engineering binaries, which makes
use of the radare2 framework. Advanced users are expected to use the
......
......@@ -142,6 +142,7 @@ License: CC0-1.0
Files: debian/*
Copyright: 2017, 2018, Sebastian Reichel <sre@debian.org>
2019 Hilko Bengen, <bengen@debian.org>
2020 Robert Haist <rha@debian.org>
License: ISC
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
......
[DEFAULT]
debian-branch = debian/master
pristine-tar = True
[buildpackage]
sign-tags = True
[import-orig]
filter-pristine-tar = True
[pq]
patch-numbers = False
[dch]
multimaint-merge = True
[Desktop Entry]
Name=Cutter
Comment=GUI interface for radare2 dissembler framework
Encoding=UTF-8
Exec=Cutter
Icon=cutter
Type=Application
Categories=07-04-radare2;
X-Parrot-Package=radare2-cutter
\ No newline at end of file
......@@ -2,21 +2,23 @@
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed
DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
# -DPYTHON_CONFIG_SUFFIX=".cpython-37m-x86_64-linux-gnu" -DCUTTER_ENABLE_PYTHON=on -DCUTTER_ENABLE_PYTHON_BINDINGS=on
%:
dh $@ --buildsystem=cmake --sourcedirectory=src
override_dh_auto_configure:
dh_auto_configure -- -DCUTTER_ENABLE_QTWEBENGINE=true -DCUTTER_ENABLE_GRAPHVIZ=true -DCUTTER_ENABLE_KSYNTAXHIGHLIGHTING=on
dh_auto_configure -- \
-DCUTTER_ENABLE_PYTHON=ON \
-DCUTTER_ENABLE_CRASH_REPORTS=OFF \
-DCMAKE_BUILD_TYPE=Release
override_dh_auto_install:
mkdir -p debian/radare2-cutter/usr/bin
install -m755 ./obj-$(DEB_HOST_GNU_TYPE)/Cutter debian/radare2-cutter/usr/bin/
mkdir -p debian/radare2-cutter/usr/share/applications
install -m644 ./src/org.radare.Cutter.desktop debian/radare2-cutter/usr/share/applications
mkdir -p debian/radare2-cutter/usr/share/icons/hicolor/scalable/apps
install -m644 ./src/img/cutter.svg debian/radare2-cutter/usr/share/icons/hicolor/scalable/apps
mkdir -p debian/radare2-cutter/usr/share/applications/
install -m644 debian/parrot-cutter.desktop debian/radare2-cutter/usr/share/applications/
---
include:
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
Contributing
============
This page shows some hints about the coding conventions.
Coding advices
--------------
CutterCore class
~~~~~~~~~~~~~~~~
This is the main class where every link with r2 is made. It is *unique*
accross the whole process. To access it, simply call ``Core()``.
Example:
.. code:: cpp
Core()->getOffset();
Calling a radare2 command
~~~~~~~~~~~~~~~~~~~~~~~~~
There are two ways to call a radare2 command:
- ``CutterCore::cmd()`` *(Discouraged)* Only use it for commands which yells no output
- ``CutterCore::cmdj()`` To be used with json commands like ``cmdj("agj")`` or ``cmdj("aflj")``.
Generally, if one needs to retrieve information from a radare2 command, it
is preferred to use the json API.
Example:
.. code:: cpp
QJsonArray array = Core()->cmdj("pdj 1 @ main").array();
Seek the current file
~~~~~~~~~~~~~~~~~~~~~
To modify radare2 seek use ``CutterCore::seek(const RVA offset)``. This
is important because it will emit a
``CutterCore::seekChanged(RVA offset)`` signal. Never ever call
``cmd("s offset")``;
Example:
.. code:: cpp
Core()->seek(0x00C0FFEE);
Creating a widget
~~~~~~~~~~~~~~~~~
Make sure to connect the ``CutterCore::seekChanged(RVA offset)`` signal
so your widget refreshes its output when radare2 seek is modified
(switching to another function, etc.).
General coding guidelines
-------------------------
Coding style
~~~~~~~~~~~~
In general, we follow `the official Qt guidelines <https://wiki.qt.io/Qt_Coding_Style>`__ to
format the code. If in doubt, you can use `AStyle
2.06 <https://sourceforge.net/projects/astyle/files/astyle/astyle%202.06/>`__
to format the code. The command line for formatting the code according
to the style is:
.. code:: bash
astyle --project=src/Cutter.astylerc src/filename.cpp
In contrast to the official guidelines of Qt, in Cutter we always use curly braces in conditional statements, even if the body of a conditional statement contains only one line.
.. code:: cpp
// Wrong
if (address.isEmpty())
return false;
// Correct
if (address.isEmpty()) {
return false;
}
// Wrong
for (int i = 0; i < 10; ++i)
qDebug("%i", i);
// Correct
for (int i = 0; i < 10; ++i) {
qDebug("%i", i);
}
Includes
^^^^^^^^
Strive to include only **required** definitions inside header files.
This will avoid triggering additional unnecessary compilations.
If you only need to know that a class exists but don't need the prototype,
you can declare the class like this:
.. code:: cpp
class MyClassThatExists;
/** ... **/
private:
MyClassThatExists *classInstance;
And then include the class header inside your .cpp so you can use that class.
If you need something in the source file (.cpp) that is not a class member,
then add the include in the source file.
The includes must be ordered from local to global. That is, first include
any local header file (with doublequotes like `#include "common/Helpers.h"`.
Then, after an empty newline, include Qt definitions like
`#include <QShortcut>`.
Finally, include the standard C++ headers you need.
Includes must be sorted by alphabetical order.
Docstrings
^^^^^^^^^^
Our API reference is generated using Doxygen, so when it comes to
function documentation, please use the following format:
.. code:: cpp
/**
* @brief Add a new param to the accumulator
*/
virtual void accumulate(RefreshDeferrerParams params) =0;
Loops
^^^^^
We use the C++11 foreach loop style, which means any “foreach” loop should
look like:
.. code:: cpp
for (QJsonValue value : importsArray) {
doSomething(value);
}
nullptr
^^^^^^^
Please do not use ``0`` nor ``Q_NULLPTR``, only use ``nullptr``.
Example:
.. code:: cpp
QObject *object = nullptr;
Connecting signals
^^^^^^^^^^^^^^^^^^
To connect a signal to a slot, this is the preferred syntax:
.. code:: cpp
connect(sender, &QObject::destroyed, this, &MyObject::objectDestroyed);
The main reason is that this syntax allows the use of lambda functions.
Functions documentation
~~~~~~~~~~~~~~~~~~~~~~~
You can find the classes documentation in the API Reference menu item.
......@@ -26,7 +26,7 @@ author = 'The Cutter Developers'
# The short X.Y version
version = '1.10'
# The full version, including alpha/beta/rc tags
release = '1.10.1'
release = '1.10.2'
# -- General configuration ---------------------------------------------------
......
......@@ -18,7 +18,7 @@ download the latest release
- OSX: Download the latest ``.dmg`` file.
- Windows: Download the latest archive.
- Linux: use the AppImage file. Then just make it executable and run it: ``chmod +x Cutter-v1.10.1-x86_64.AppImage``
- Linux: use the AppImage file. Then just make it executable and run it: ``chmod +x Cutter-v1.10.2-x86_64.AppImage``
Building from sources
......
......@@ -4,7 +4,7 @@ TARGET = Cutter
CUTTER_VERSION_MAJOR = 1
CUTTER_VERSION_MINOR = 10
CUTTER_VERSION_PATCH = 1
CUTTER_VERSION_PATCH = 2
VERSION = $${CUTTER_VERSION_MAJOR}.$${CUTTER_VERSION_MINOR}.$${CUTTER_VERSION_PATCH}
......
......@@ -707,3 +707,24 @@ void Configuration::setDecompilerAutoRefreshEnabled(bool enabled)
{
s.setValue("decompilerAutoRefresh", enabled);
}
bool Configuration::getBitmapTransparentState()
{
return s.value("bitmapGraphExportTransparency", false).value<bool>();
}
double Configuration::getBitmapExportScaleFactor()
{
return s.value("bitmapGraphExportScale", 1.0).value<double>();
}
void Configuration::setBitmapTransparentState(bool inputValueGraph)
{
s.setValue("bitmapGraphExportTransparency", inputValueGraph);
}
void Configuration::setBitmapExportScaleFactor(double inputValueGraph)
{
s.setValue("bitmapGraphExportScale", inputValueGraph);
}
......@@ -18,6 +18,7 @@ namespace KSyntaxHighlighting {
class QSyntaxHighlighter;
class QTextDocument;
enum ColorFlags {
LightFlag = 1,
DarkFlag = 2,
......@@ -171,6 +172,15 @@ public:
bool getDecompilerAutoRefreshEnabled();
void setDecompilerAutoRefreshEnabled(bool enabled);
/**
* @brief Getters and setters for the transaparent option state and scale factor for bitmap graph exports.
*/
bool getBitmapTransparentState();
double getBitmapExportScaleFactor();
void setBitmapTransparentState(bool inputValueGraph);
void setBitmapExportScaleFactor(double inputValueGraph);
public slots:
void refreshFont();
signals:
......
......@@ -14,9 +14,13 @@ GraphOptionsWidget::GraphOptionsWidget(PreferencesDialog *dialog)
ui(new Ui::GraphOptionsWidget)
{
ui->setupUi(this);
ui->checkTransparent->setChecked(Config()->getBitmapTransparentState());
ui->bitmapGraphScale->setValue(Config()->getBitmapExportScaleFactor()*100.0);
updateOptionsFromVars();
connect<void(QDoubleSpinBox::*)(double)>(ui->bitmapGraphScale, (&QDoubleSpinBox::valueChanged), this, &GraphOptionsWidget::bitmapGraphScaleValueChanged);
connect(ui->checkTransparent, &QCheckBox::stateChanged, this, &GraphOptionsWidget::checkTransparentStateChanged);
connect(Core(), SIGNAL(graphOptionsChanged()), this, SLOT(updateOptionsFromVars()));
}
......@@ -50,3 +54,15 @@ void GraphOptionsWidget::on_graphOffsetCheckBox_toggled(bool checked)
Config()->setConfig("graph.offset", checked);
triggerOptionsChanged();
}
void GraphOptionsWidget::checkTransparentStateChanged(int checked)
{
Config()->setBitmapTransparentState(checked);
}
void GraphOptionsWidget::bitmapGraphScaleValueChanged(double value)
{
double value_decimal = value/(double)100.0;
Config()->setBitmapExportScaleFactor(value_decimal);
}
......@@ -21,7 +21,6 @@ class GraphOptionsWidget : public QDialog
public:
explicit GraphOptionsWidget(PreferencesDialog *dialog);
~GraphOptionsWidget();
private:
std::unique_ptr<Ui::GraphOptionsWidget> ui;
......@@ -32,6 +31,10 @@ private slots:
void on_maxColsSpinBox_valueChanged(int value);
void on_graphOffsetCheckBox_toggled(bool checked);
void checkTransparentStateChanged(int checked);
void bitmapGraphScaleValueChanged(double value);
};
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>567</width>
<height>79</height>
<width>557</width>
<height>175</height>
</rect>
</property>
<property name="windowTitle">
......@@ -36,6 +36,32 @@
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="bitmapGraphScaleLabel">
<property name="text">
<string>Graph Bitmap Export Scale: </string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="bitmapGraphScale">
<property name="suffix">
<string>%</string>
</property>
<property name="decimals">
<number>0</number>
</property>
<property name="minimum">
<double>100.000000000000000</double>
</property>
<property name="maximum">
<double>30000.000000000000000</double>
</property>
<property name="singleStep">
<double>50.000000000000000</double>
</property>
</widget>
</item>
</layout>
</item>
<item>
......@@ -59,6 +85,19 @@