Class: Idb::AppBinaryGroupBox
- Inherits:
-
Qt::GroupBox
- Object
- Qt::GroupBox
- Idb::AppBinaryGroupBox
- Defined in:
- lib/gui/app_details_group_box.rb
Instance Method Summary collapse
- #addDetail(id, label) ⇒ Object
- #app_changed ⇒ Object
- #clear ⇒ Object
- #disable_analyze_binary ⇒ Object
-
#initialize(args) ⇒ AppBinaryGroupBox
constructor
A new instance of AppBinaryGroupBox.
Constructor Details
#initialize(args) ⇒ AppBinaryGroupBox
Returns a new instance of AppBinaryGroupBox.
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/gui/app_details_group_box.rb', line 115 def initialize args super *args # details on selected app @layout = Qt::GridLayout.new setLayout(@layout) setTitle "App Binary" # analyze binary = Qt::PushButton.new "Analyze Binary..." .setEnabled(false) .connect(SIGNAL(:released)) { |x| #TODO progress bar $selected_app.analyze @vals['encryption_enabled'].setText($selected_app.binary.is_encrypted?.to_s) @vals['cryptid'].setText($selected_app.binary.get_cryptid.to_s) @vals['pie'].setText($selected_app.binary.is_pie?.to_s) @vals['canaries'].setText($selected_app.binary.is_stack_protected?.to_s) @vals['arc'].setText($selected_app.binary.uses_arc?.to_s) emit binary_analyzed() } @layout.addWidget , 0, 0, 1, 2 @labels = Hash.new @vals = Hash.new @cur_row = 1 addDetail 'encryption_enabled', 'Encryption?' addDetail 'cryptid', 'Cryptid' addDetail 'pie', 'PIE' addDetail 'canaries', 'Stack Canaries' addDetail 'arc', 'ARC' clear end |
Instance Method Details
#addDetail(id, label) ⇒ Object
154 155 156 157 158 159 160 |
# File 'lib/gui/app_details_group_box.rb', line 154 def addDetail id, label @labels[id] = Qt::Label.new "<b>#{label}</b>", self, 0 @vals[id] = Qt::Label.new "", self, 0 @layout.addWidget @labels[id], @cur_row, 0 @layout.addWidget @vals[id], @cur_row, 1 @cur_row += 1 end |
#app_changed ⇒ Object
162 163 164 165 |
# File 'lib/gui/app_details_group_box.rb', line 162 def app_changed clear .setEnabled(true) end |
#clear ⇒ Object
167 168 169 170 171 172 173 |
# File 'lib/gui/app_details_group_box.rb', line 167 def clear @vals['encryption_enabled'].setText("[Binary not yet analyzed]") @vals['cryptid'].setText("[Binary not yet analyzed]") @vals['pie'].setText("[Binary not yet analyzed]") @vals['canaries'].setText("[Binary not yet analyzed]") @vals['arc'].setText("[Binary not yet analyzed]") end |
#disable_analyze_binary ⇒ Object
175 176 177 |
# File 'lib/gui/app_details_group_box.rb', line 175 def disable_analyze_binary .setEnabled(false) end |