1
0
Fork 0

GUI: added C-Style shellcode string

This commit is contained in:
mrexodia 2015-12-29 23:35:58 +01:00
parent 79c3638428
commit 59e6c43b18
2 changed files with 14 additions and 0 deletions

View File

@ -17,6 +17,7 @@ DataCopyDialog::DataCopyDialog(const QVector<byte_t>* data, QWidget* parent) : Q
ui->comboType->addItem("C-Style QWORD (Hex)");
ui->comboType->addItem("C-Style String");
ui->comboType->addItem("C-Style Unicode String");
ui->comboType->addItem("C-Style Shellcode String");
ui->comboType->addItem("Pascal BYTE (Hex)");
ui->comboType->addItem("Pascal WORD (Hex)");
ui->comboType->addItem("Pascal DWORD (Hex)");
@ -176,6 +177,18 @@ void DataCopyDialog::printData(DataType type)
}
break;
case DataCShellcodeString:
{
data += "\"";
for(int i = 0; i < mData->size(); i++)
{
byte_t ch = mData->at(i);
data += QString().sprintf("\\x%02X", ch);
}
data += "\"";
}
break;
case DataPascalByte:
{
int numbytes = mData->size() / sizeof(unsigned char);

View File

@ -34,6 +34,7 @@ private:
DataCQword,
DataCString,
DataCUnicodeString,
DataCShellcodeString,
DataPascalByte,
DataPascalWord,
DataPascalDword,