"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/widgets/HexdumpWidget.cpp" between
cutter-1.10.2.tar.gz and cutter-1.10.3.tar.gz

About: cutter is a Qt and C++ GUI for radare2 reverse engineering framework.

HexdumpWidget.cpp  (cutter-1.10.2):HexdumpWidget.cpp  (cutter-1.10.3)
skipping to change at line 86 skipping to change at line 86
"}"); "}");
setWindowTitle(getWindowTitle()); setWindowTitle(getWindowTitle());
refreshDeferrer = createReplacingRefreshDeferrer<RVA>(false, [this](const RV A *offset) { refreshDeferrer = createReplacingRefreshDeferrer<RVA>(false, [this](const RV A *offset) {
refresh(offset ? *offset : RVA_INVALID); refresh(offset ? *offset : RVA_INVALID);
}); });
this->ui->hexTextView->addAction(&syncAction); this->ui->hexTextView->addAction(&syncAction);
connect(Config(), SIGNAL(fontsUpdated()), this, SLOT(fontsUpdated())); connect(Config(), &Configuration::fontsUpdated, this, &HexdumpWidget::fontsU pdated);
connect(Core(), &CutterCore::refreshAll, this, [this]() { refresh(); }); connect(Core(), &CutterCore::refreshAll, this, [this]() { refresh(); });
connect(Core(), &CutterCore::instructionChanged, this, [this]() { refresh(); }); connect(Core(), &CutterCore::instructionChanged, this, [this]() { refresh(); });
connect(Core(), &CutterCore::stackChanged, this, [this]() { refresh(); }); connect(Core(), &CutterCore::stackChanged, this, [this]() { refresh(); });
connect(Core(), &CutterCore::registersChanged, this, [this]() { refresh(); } ); connect(Core(), &CutterCore::registersChanged, this, [this]() { refresh(); } );
connect(seekable, &CutterSeekable::seekableSeekChanged, this, &HexdumpWidget ::onSeekChanged); connect(seekable, &CutterSeekable::seekableSeekChanged, this, &HexdumpWidget ::onSeekChanged);
connect(ui->hexTextView, &HexWidget::positionChanged, this, [this](RVA addr) { connect(ui->hexTextView, &HexWidget::positionChanged, this, [this](RVA addr) {
if (!sent_seek) { if (!sent_seek) {
sent_seek = true; sent_seek = true;
seekable->seek(addr); seekable->seek(addr);
skipping to change at line 221 skipping to change at line 221
{ {
return tr("Hexdump"); return tr("Hexdump");
} }
void HexdumpWidget::updateParseWindow(RVA start_address, int size) void HexdumpWidget::updateParseWindow(RVA start_address, int size)
{ {
if (!ui->hexSideTab_2->isVisible()) { if (!ui->hexSideTab_2->isVisible()) {
return; return;
} }
QString address = RAddressString(start_address);
QString argument = QString("%1@" + address).arg(size);
if (ui->hexSideTab_2->currentIndex() == 0) { if (ui->hexSideTab_2->currentIndex() == 0) {
// scope for TempConfig // scope for TempConfig
// Get selected combos // Get selected combos
QString arch = ui->parseArchComboBox->currentText(); QString arch = ui->parseArchComboBox->currentText();
QString bits = ui->parseBitsComboBox->currentText(); QString bits = ui->parseBitsComboBox->currentText();
QString selectedCommand = ""; QString selectedCommand = "";
QString commandResult = ""; QString commandResult = "";
bool bigEndian = ui->parseEndianComboBox->currentIndex() == 1; bool bigEndian = ui->parseEndianComboBox->currentIndex() == 1;
skipping to change at line 275 skipping to change at line 272
case 8: // JSON case 8: // JSON
selectedCommand = "pcj"; selectedCommand = "pcj";
break; break;
case 9: // JavaScript case 9: // JavaScript
selectedCommand = "pcJ"; selectedCommand = "pcJ";
break; break;
case 10: // Yara case 10: // Yara
selectedCommand = "pcy"; selectedCommand = "pcy";
break; break;
} }
ui->hexDisasTextEdit->setPlainText(selectedCommand != "" ? Core()->cmd(s ui->hexDisasTextEdit->setPlainText(selectedCommand != "" ? Core()->cmdRa
electedCommand + " " + argument) : ""); wAt(QString("%1 %2")
.arg(selecte
dCommand)
.arg(size)
, start_addr
ess) : "");
} else { } else {
// Fill the information tab hashes and entropy // Fill the information tab hashes and entropy
ui->bytesMD5->setText(Core()->cmd("ph md5 " + argument).trimmed()); ui->bytesMD5->setText(Core()->cmdRawAt(QString("ph md5 %1").arg(size), s
ui->bytesSHA1->setText(Core()->cmd("ph sha1 " + argument).trimmed()); tart_address).trimmed());
ui->bytesSHA256->setText(Core()->cmd("ph sha256 " + argument).trimmed()) ui->bytesSHA1->setText(Core()->cmdRawAt(QString("ph sha1 %1").arg(size),
; start_address).trimmed());
ui->bytesCRC32->setText(Core()->cmd("ph crc32 " + argument).trimmed()); ui->bytesSHA256->setText(Core()->cmdRawAt(QString("ph sha256 %1").arg(si
ui->bytesEntropy->setText(Core()->cmd("ph entropy " + argument).trimmed( ze), start_address).trimmed());
)); ui->bytesCRC32->setText(Core()->cmdRawAt(QString("ph crc32 %1").arg(size
), start_address).trimmed());
ui->bytesEntropy->setText(Core()->cmdRawAt(QString("ph entropy %1").arg(
size), start_address).trimmed());
ui->bytesMD5->setCursorPosition(0); ui->bytesMD5->setCursorPosition(0);
ui->bytesSHA1->setCursorPosition(0); ui->bytesSHA1->setCursorPosition(0);
ui->bytesSHA256->setCursorPosition(0); ui->bytesSHA256->setCursorPosition(0);
ui->bytesCRC32->setCursorPosition(0); ui->bytesCRC32->setCursorPosition(0);
} }
} }
void HexdumpWidget::on_parseTypeComboBox_currentTextChanged(const QString &) void HexdumpWidget::on_parseTypeComboBox_currentTextChanged(const QString &)
{ {
if (ui->parseTypeComboBox->currentIndex() == 0) { if (ui->parseTypeComboBox->currentIndex() == 0) {
 End of changes. 4 change blocks. 
13 lines changed or deleted 18 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)