├── BlackRicovery 2.0 GUI Src ├── BlackRicovery.pro ├── BlackRicovery.pro.user ├── Disk.ico ├── allchack.h ├── blackricovery.qrc ├── css │ ├── coffee.css │ ├── pagefold.css │ └── technic.css ├── dataheader.h ├── globlevariable.cpp ├── globlevariable.h ├── headerfuncation.h ├── images │ ├── Borderl.png │ ├── Close.png │ ├── Drive.png │ ├── Min.png │ ├── My Music.ico │ ├── Settingico.png │ ├── Untitled-1.png │ ├── b1.png │ ├── b3.png │ ├── back.png │ ├── bor3.png │ ├── bu1.png │ ├── bu2.png │ ├── c1.png │ ├── checkbox_checked.png │ ├── checkbox_checked_hover.png │ ├── checkbox_checked_pressed.png │ ├── checkbox_unchecked.png │ ├── checkbox_unchecked_hover.png │ ├── checkbox_unchecked_pressed.png │ ├── d5.png │ ├── d6.png │ ├── d8.png │ ├── down_arrow.png │ ├── down_arrow_disabled.png │ ├── extr1.png │ ├── fileext.png │ ├── fileextit.png │ ├── frame.png │ ├── ggg.png │ ├── pa.png │ ├── pagefold.png │ ├── pushbutton.png │ ├── pushbutton_hover.png │ ├── pushbutton_pressed.png │ ├── radiobutton_checked.png │ ├── radiobutton_checked_hover.png │ ├── radiobutton_checked_pressed.png │ ├── radiobutton_unchecked.png │ ├── radiobutton_unchecked_hover.png │ ├── radiobutton_unchecked_pressed.png │ ├── s1.png │ ├── sizegrip.png │ ├── spindown.png │ ├── spindown_hover.png │ ├── spindown_off.png │ ├── spindown_pressed.png │ ├── spinup.png │ ├── spinup_hover.png │ ├── spinup_off.png │ ├── spinup_pressed.png │ ├── sty.png │ ├── up_arrow.png │ └── up_arrow_disabled.png ├── main.cpp ├── mainwindow.cpp └── mainwindow.h ├── BlackRicovery Bin.zip ├── DataRicoverySoft 1.0 GUI Src ├── DataRicoverySoft.sln ├── DataRicoverySoft.v11.suo └── DataRicoverySoft │ ├── DataFun.h │ ├── DataHeader.h │ ├── DataRicoverySoft.aps │ ├── DataRicoverySoft.cpp │ ├── DataRicoverySoft.exe.manifest │ ├── DataRicoverySoft.rc │ ├── DataRicoverySoft.vcxproj │ ├── DataRicoverySoft.vcxproj.filters │ ├── DataRicoverySoft.vcxproj.user │ ├── DriveList.h │ ├── FatR.h │ ├── Floppy_Drive.ico │ ├── GlobleFun.h │ ├── GlobleVar.h │ ├── List Of Deleted File.txt │ ├── NtfsRicover.h │ ├── RecoverTheFile.h │ ├── Resource.aps │ ├── Resource.rc │ ├── allcheck.h │ ├── fatmbr.h │ ├── lodf.inf │ ├── lodf.infor │ ├── ntfs.h │ ├── resource.h │ └── resource1.h ├── DataRicoverySoft Bin.zip ├── MyDataRicovery Bin .zip └── README.md /BlackRicovery 2.0 GUI Src/BlackRicovery.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2016-05-08T16:51:34 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui 8 | 9 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 10 | 11 | TARGET = BlackRicovery 12 | TEMPLATE = app 13 | 14 | 15 | SOURCES += main.cpp\ 16 | mainwindow.cpp \ 17 | globlevariable.cpp 18 | 19 | HEADERS += mainwindow.h \ 20 | globlevariable.h \ 21 | headerfuncation.h \ 22 | allchack.h \ 23 | dataheader.h 24 | 25 | FORMS += mainwindow.ui 26 | 27 | RESOURCES += \ 28 | blackricovery.qrc 29 | -------------------------------------------------------------------------------- /BlackRicovery 2.0 GUI Src/Disk.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yang123vc/DataRecovery-1/3c82762305e5c8b87cdc7bba1fc7fc81a47a1653/BlackRicovery 2.0 GUI Src/Disk.ico -------------------------------------------------------------------------------- /BlackRicovery 2.0 GUI Src/blackricovery.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | css/coffee.css 4 | css/pagefold.css 5 | images/checkbox_checked.png 6 | images/checkbox_checked_hover.png 7 | images/checkbox_checked_pressed.png 8 | images/checkbox_unchecked.png 9 | images/checkbox_unchecked_hover.png 10 | images/checkbox_unchecked_pressed.png 11 | images/down_arrow.png 12 | images/down_arrow_disabled.png 13 | images/frame.png 14 | images/pagefold.png 15 | images/pushbutton.png 16 | images/pushbutton_hover.png 17 | images/pushbutton_pressed.png 18 | images/radiobutton_checked.png 19 | images/radiobutton_checked_hover.png 20 | images/radiobutton_checked_pressed.png 21 | images/radiobutton_unchecked.png 22 | images/radiobutton_unchecked_hover.png 23 | images/radiobutton_unchecked_pressed.png 24 | images/sizegrip.png 25 | images/spindown.png 26 | images/spindown_hover.png 27 | images/spindown_off.png 28 | images/spindown_pressed.png 29 | images/spinup.png 30 | images/spinup_hover.png 31 | images/spinup_off.png 32 | images/spinup_pressed.png 33 | images/up_arrow.png 34 | images/up_arrow_disabled.png 35 | sta/SSetting.sta 36 | images/Settingico.png 37 | images/Borderl.png 38 | images/Close.png 39 | images/Drive.png 40 | images/Min.png 41 | images/My Music.ico 42 | images/fileext.png 43 | Disk.ico 44 | images/ggg.png 45 | images/pa.png 46 | images/fileextit.png 47 | images/back.png 48 | css/technic.css 49 | images/d5.png 50 | images/d6.png 51 | images/d8.png 52 | images/sty.png 53 | images/extr1.png 54 | images/s1.png 55 | images/Untitled-1.png 56 | images/b1.png 57 | images/b3.png 58 | images/bor3.png 59 | images/bu1.png 60 | images/bu2.png 61 | images/c1.png 62 | 63 | 64 | -------------------------------------------------------------------------------- /BlackRicovery 2.0 GUI Src/css/coffee.css: -------------------------------------------------------------------------------- 1 | .QWidget { 2 | background-color: beige; 3 | } 4 | 5 | /* Nice Windows-XP-style password character. */ 6 | QLineEdit[echoMode="2"] { 7 | lineedit-password-character: 9679; 8 | } 9 | 10 | /* We provide a min-width and min-height for push buttons 11 | so that they look elegant regardless of the width of the text. */ 12 | QPushButton { 13 | background-color: palegoldenrod; 14 | border-width: 2px; 15 | border-color: darkkhaki; 16 | border-style: solid; 17 | border-radius: 5; 18 | padding: 3px; 19 | min-width: 9ex; 20 | min-height: 2.5ex; 21 | } 22 | 23 | QPushButton:hover { 24 | background-color: khaki; 25 | } 26 | 27 | /* Increase the padding, so the text is shifted when the button is 28 | pressed. */ 29 | QPushButton:pressed { 30 | padding-left: 5px; 31 | padding-top: 5px; 32 | background-color: #d0d67c; 33 | } 34 | 35 | QLabel, QAbstractButton { 36 | font: bold; 37 | } 38 | 39 | /* Mark mandatory fields with a brownish color. */ 40 | .mandatory { 41 | color: brown; 42 | } 43 | 44 | /* Bold text on status bar looks awful. */ 45 | QStatusBar QLabel { 46 | font: normal; 47 | } 48 | 49 | QStatusBar::item { 50 | border-width: 1; 51 | border-color: darkkhaki; 52 | border-style: solid; 53 | border-radius: 2; 54 | } 55 | 56 | QComboBox, QLineEdit, QSpinBox, QTextEdit, QListView { 57 | background-color: cornsilk; 58 | selection-color: #0a214c; 59 | selection-background-color: #C19A6B; 60 | } 61 | 62 | QListView { 63 | show-decoration-selected: 1; 64 | } 65 | 66 | QListView::item:hover { 67 | background-color: wheat; 68 | } 69 | 70 | /* We reserve 1 pixel space in padding. When we get the focus, 71 | we kill the padding and enlarge the border. This makes the items 72 | glow. */ 73 | QLineEdit, QFrame { 74 | border-width: 2px; 75 | padding: 1px; 76 | border-style: solid; 77 | border-color: darkkhaki; 78 | border-radius: 5px; 79 | } 80 | 81 | /* As mentioned above, eliminate the padding and increase the border. */ 82 | QLineEdit:focus, QFrame:focus { 83 | border-width: 3px; 84 | padding: 0px; 85 | } 86 | 87 | /* A QLabel is a QFrame ... */ 88 | QLabel { 89 | border: none; 90 | padding: 0; 91 | background: none; 92 | } 93 | 94 | /* A QToolTip is a QLabel ... */ 95 | QToolTip { 96 | border: 2px solid darkkhaki; 97 | padding: 5px; 98 | border-radius: 3px; 99 | opacity: 200; 100 | } 101 | 102 | /* Nice to have the background color change when hovered. */ 103 | QRadioButton:hover, QCheckBox:hover { 104 | background-color: wheat; 105 | } 106 | 107 | /* Force the dialog's buttons to follow the Windows guidelines. */ 108 | QDialogButtonBox { 109 | button-layout: 0; 110 | } 111 | 112 | 113 | -------------------------------------------------------------------------------- /BlackRicovery 2.0 GUI Src/css/pagefold.css: -------------------------------------------------------------------------------- 1 | /* Customize any plain widget that is a child of a QMainWindow. */ 2 | QMainWindow > .QWidget { 3 | background-color: gainsboro; 4 | background-image: url(:/images/pagefold.png); 5 | background-position: top right; 6 | background-repeat: no-repeat 7 | } 8 | 9 | #mainFrame { 10 | padding-right: 30px; 11 | border-style: none; 12 | border-image: none; /* since we set a border-image below */ 13 | 14 | } 15 | 16 | /* mainFrame won't have this border-image since we have 17 | explicitly set it to 'none' using a more specific selector. */ 18 | QFrame, QLineEdit, QComboBox[editable="true"], QSpinBox { 19 | border-image: url(:/images/frame.png) 4; 20 | border-width: 3; 21 | 22 | 23 | } 24 | QLabel { 25 | border: none; 26 | border-image: none; 27 | padding: 0; 28 | background: none; 29 | } 30 | 31 | /* Make text in message boxes selectable. */ 32 | QMessageBox { 33 | /* LinksAccessibleByMouse | TextSelectableByMouse */ 34 | messagebox-text-interaction-flags: 5; 35 | } 36 | 37 | /* Set the selection colors for all widgets. */ 38 | QWidget { 39 | selection-color: black; 40 | selection-background-color: Silver; 41 | color: black; 42 | } 43 | 44 | /* Make the entire row selected in item views. */ 45 | QAbstractItemView { 46 | show-decoration-selected: 1; 47 | } 48 | 49 | /* Nice WindowsXP-style password character for password line edits. */ 50 | QLineEdit[echoMode="2"] { 51 | lineedit-password-character: 9679; 52 | } 53 | 54 | /* Customize tooltips. */ 55 | QToolTip { 56 | background-color: rgb(200,200,255); 57 | border-color: darkslategray; 58 | border-width: 1px; 59 | border-style: solid; 60 | padding: 3px; 61 | font: bold; 62 | border-radius: 3px; 63 | opacity: 200; 64 | } 65 | 66 | /* Customize radio buttons. */ 67 | 68 | QRadioButton { 69 | spacing: 5px; 70 | } 71 | 72 | QRadioButton::indicator { 73 | width: 13px; 74 | height: 13px; 75 | } 76 | 77 | QRadioButton::indicator::unchecked { 78 | image: url(:/images/radiobutton_unchecked.png); 79 | } 80 | 81 | QRadioButton::indicator:unchecked:hover { 82 | image: url(:/images/radiobutton_unchecked_hover.png); 83 | } 84 | 85 | QRadioButton::indicator:unchecked:pressed { 86 | image: url(:/images/radiobutton_unchecked_pressed.png); 87 | } 88 | 89 | QRadioButton::indicator::checked { 90 | image: url(:/images/radiobutton_checked.png); 91 | } 92 | 93 | QRadioButton::indicator:checked:hover { 94 | image: url(:/images/radiobutton_checked_hover.png); 95 | } 96 | 97 | QRadioButton::indicator:checked:pressed { 98 | image: url(:/images/radiobutton_checked_pressed.png); 99 | } 100 | 101 | /* Customize arrows. */ 102 | 103 | *::down-arrow, *::menu-indicator { 104 | image: url(:/images/down_arrow.png); 105 | width: 7px; 106 | height: 7px; 107 | } 108 | 109 | *::down-arrow:disabled, *::down-arrow:off { 110 | image: url(:/images/down_arrow_disabled.png); 111 | } 112 | 113 | *::up-arrow { 114 | image: url(:/images/up_arrow.png); 115 | width: 7px; 116 | height: 7px; 117 | } 118 | 119 | *::up-arrow:disabled, *::up-arrow:off { 120 | image: url(:/images/up_arrow_disabled.png); 121 | } 122 | 123 | /* Customize push buttons and comboboxes. Our read-only combobox 124 | is very similar to a push button, so they share the same border image. */ 125 | 126 | QPushButton { 127 | min-width: 4em; 128 | } 129 | 130 | QPushButton, QComboBox[editable="false"], 131 | QComboBox[editable="true"]::drop-down { 132 | border-image: url(:/images/pushbutton.png) 5; 133 | border-width: 5; 134 | } 135 | 136 | QPushButton:hover, QComboBox[editable="false"]:hover, 137 | QComboBox[editable="true"]::drop-down:hover, QMenuBar::item:hover { 138 | border-image: url(:/images/pushbutton_hover.png) 5; 139 | border-width: 5; 140 | } 141 | 142 | QPushButton:pressed, QComboBox[editable="false"]:on, 143 | QComboBox[editable="true"]::drop-down:on, QMenuBar::item:on { 144 | border-image: url(:/images/pushbutton_pressed.png) 5; 145 | border-width: 5; 146 | } 147 | 148 | /* Customize read-only comboboxes. */ 149 | 150 | QComboBox[editable="false"] { 151 | padding-left: 3px; 152 | padding-right: 20px; /* space for the arrow */ 153 | } 154 | 155 | QComboBox[editable="false"]::drop-down { 156 | subcontrol-origin: padding; 157 | subcontrol-position: top right; 158 | width: 15px; 159 | border-left-style: solid; 160 | border-left-color: darkgray; 161 | border-left-width: 1px; 162 | } 163 | 164 | QComboBox[editable="false"]::down-arrow { 165 | subcontrol-origin: content; 166 | subcontrol-position: center; 167 | position: relative; 168 | left: 1px; /* 1 pixel dropdown border */ 169 | } 170 | 171 | /* The combobox arrow is on when the popup is open. */ 172 | QComboBox[editable="false"]::down-arrow:on { 173 | position: relative; 174 | top: 1px; 175 | left: 2px; 176 | } 177 | 178 | /* Customize editable comboboxes. */ 179 | 180 | QComboBox[editable="true"] { 181 | padding-right: 16px; 182 | } 183 | 184 | QComboBox[editable="true"]::drop-down { 185 | subcontrol-origin: border; 186 | subcontrol-position: top right; 187 | width: 13px; 188 | position: absolute; 189 | top: 2px; 190 | bottom: 2px; 191 | right: 2px; 192 | } 193 | 194 | QComboBox[editable="true"]::drop-down, 195 | QComboBox[editable="true"]::drop-down:hover, 196 | QComboBox[editable="true"]::drop-down:on { 197 | border-width: 0px; 198 | border-left-width: 3px; /* we need only left and center part */ 199 | } 200 | 201 | /* Shift the arrow when it's open. */ 202 | QComboBox[editable="true"]::down-arrow:on { 203 | position: relative; 204 | top: 1px; 205 | left: 1px; 206 | } 207 | 208 | /* Customize check boxes. */ 209 | QCheckBox { 210 | spacing: 5px; 211 | } 212 | 213 | QCheckBox::indicator { 214 | width: 13px; 215 | height: 13px; 216 | } 217 | 218 | QCheckBox::indicator:unchecked { 219 | image: url(:/images/checkbox_unchecked.png); 220 | } 221 | 222 | QCheckBox::indicator:unchecked:hover { 223 | image: url(:/images/checkbox_unchecked_hover.png); 224 | } 225 | 226 | QCheckBox::indicator:unchecked:pressed { 227 | image: url(:/images/checkbox_unchecked_pressed.png); 228 | } 229 | 230 | QCheckBox::indicator:checked { 231 | image: url(:/images/checkbox_checked.png); 232 | } 233 | 234 | QCheckBox::indicator:checked:hover { 235 | image: url(:/images/checkbox_checked_hover.png); 236 | } 237 | 238 | QCheckBox::indicator:checked:pressed { 239 | image: url(:/images/checkbox_checked_pressed.png); 240 | } 241 | 242 | /* Customize the size grip. */ 243 | QSizeGrip { 244 | image: url(:/images/sizegrip.png); 245 | width: 16px; 246 | height: 16px; 247 | } 248 | 249 | /* Customize the menu bar. */ 250 | QMenuBar { 251 | border-image: none; 252 | border-style: none; 253 | border-width: 1px; 254 | border-bottom-style: solid; 255 | border-bottom-color: darkslategray; 256 | padding: 2px; 257 | } 258 | 259 | /* Customize spin boxes. */ 260 | 261 | QSpinBox { 262 | padding-right: 15px; 263 | } 264 | 265 | QSpinBox::up-button { 266 | subcontrol-origin: border; 267 | subcontrol-position: top right; 268 | 269 | width: 16px; /* 16 + 2*1px border-width = 15px padding + 3px parent border */ 270 | border-image: url(:/images/spinup.png) 1; 271 | border-width: 1px; 272 | } 273 | 274 | QSpinBox::up-button:hover { 275 | border-image: url(:/images/spinup_hover.png) 1; 276 | } 277 | 278 | QSpinBox::up-button:pressed { 279 | border-image: url(:/images/spinup_pressed.png) 1; 280 | } 281 | 282 | QSpinBox::down-button { 283 | subcontrol-origin: border; 284 | subcontrol-position: bottom right; 285 | 286 | width: 16px; 287 | border-image: url(:/images/spindown.png) 1; 288 | border-width: 1px; 289 | border-top-width: 0; 290 | } 291 | 292 | QSpinBox::down-button:hover { 293 | border-image: url(:/images/spindown_hover.png) 1; 294 | } 295 | 296 | QSpinBox::down-button:pressed { 297 | border-image: url(:/images/spindown_pressed.png) 1; 298 | } 299 | -------------------------------------------------------------------------------- /BlackRicovery 2.0 GUI Src/css/technic.css: -------------------------------------------------------------------------------- 1 | /* Customize any plain widget that is a child of a QMainWindow. */ 2 | QMainWindow > .QWidget { 3 | background-color: gainsboro; 4 | background-image: url(:/images/pagefold.png); 5 | background-position: top right; 6 | background-repeat: no-repeat 7 | } 8 | 9 | #mainFrame { 10 | padding-right: 30px; 11 | border-style: none; 12 | border-image: none; /* since we set a border-image below */ 13 | 14 | } 15 | 16 | /* mainFrame won't have this border-image since we have 17 | explicitly set it to 'none' using a more specific selector. */ 18 | QFrame, QLineEdit, QComboBox[editable="true"], QSpinBox { 19 | border-image: url(:/images/frame.png) 4; 20 | border-width: 3; 21 | 22 | 23 | } 24 | QGroupBox 25 | { 26 | border-image: url(:/images/bor3.png); 27 | border-width: 3; 28 | } 29 | QFrame#DriveFrame 30 | { 31 | /* border-image: url(:/images/Borderl.png);*/ 32 | border-image: url(:/images/d8.png); 33 | border-width: 3; 34 | } 35 | QFrame#FileExtenTionPanal 36 | { 37 | border-image: url(:/images/s1.png); 38 | border-width: 3; 39 | } 40 | QFrame#StyleFrame 41 | { 42 | border-image: url(:/images/sty.png); 43 | border-width: 3; 44 | } 45 | QMainWindow > .QWidget 46 | { 47 | border-image: url(:/images/back.png); 48 | border-width: 3; 49 | } 50 | QLabel { 51 | border: none; 52 | border-image: none; 53 | padding: 0; 54 | background: none; 55 | } 56 | 57 | /* Make text in message boxes selectable. */ 58 | QMessageBox { 59 | /* LinksAccessibleByMouse | TextSelectableByMouse */ 60 | messagebox-text-interaction-flags: 5; 61 | } 62 | 63 | /* Set the selection colors for all widgets. */ 64 | QWidget { 65 | selection-color: black; 66 | selection-background-color: Silver; 67 | color: black; 68 | } 69 | 70 | /* Make the entire row selected in item views. */ 71 | QAbstractItemView { 72 | show-decoration-selected: 1; 73 | } 74 | 75 | /* Nice WindowsXP-style password character for password line edits. */ 76 | QLineEdit[echoMode="2"] { 77 | lineedit-password-character: 9679; 78 | } 79 | 80 | /* Customize tooltips. */ 81 | QToolTip { 82 | background-color: rgb(200,200,255); 83 | border-color: darkslategray; 84 | border-width: 1px; 85 | border-style: solid; 86 | padding: 3px; 87 | font: bold; 88 | border-radius: 3px; 89 | opacity: 200; 90 | } 91 | 92 | /* Customize radio buttons. */ 93 | 94 | QRadioButton { 95 | spacing: 5px; 96 | } 97 | 98 | QRadioButton::indicator { 99 | width: 13px; 100 | height: 13px; 101 | } 102 | 103 | QRadioButton::indicator::unchecked { 104 | image: url(:/images/radiobutton_unchecked.png); 105 | } 106 | 107 | QRadioButton::indicator:unchecked:hover { 108 | image: url(:/images/radiobutton_unchecked_hover.png); 109 | } 110 | 111 | QRadioButton::indicator:unchecked:pressed { 112 | image: url(:/images/radiobutton_unchecked_pressed.png); 113 | } 114 | 115 | QRadioButton::indicator::checked { 116 | image: url(:/images/radiobutton_checked.png); 117 | } 118 | 119 | QRadioButton::indicator:checked:hover { 120 | image: url(:/images/radiobutton_checked_hover.png); 121 | } 122 | 123 | QRadioButton::indicator:checked:pressed { 124 | image: url(:/images/radiobutton_checked_pressed.png); 125 | } 126 | 127 | /* Customize arrows. */ 128 | 129 | *::down-arrow, *::menu-indicator { 130 | image: url(:/images/down_arrow.png); 131 | width: 7px; 132 | height: 7px; 133 | } 134 | 135 | *::down-arrow:disabled, *::down-arrow:off { 136 | image: url(:/images/down_arrow_disabled.png); 137 | } 138 | 139 | *::up-arrow { 140 | image: url(:/images/up_arrow.png); 141 | width: 7px; 142 | height: 7px; 143 | } 144 | 145 | *::up-arrow:disabled, *::up-arrow:off { 146 | image: url(:/images/up_arrow_disabled.png); 147 | } 148 | 149 | /* Customize push buttons and comboboxes. Our read-only combobox 150 | is very similar to a push button, so they share the same border image. */ 151 | 152 | QPushButton { 153 | min-width: 4em; 154 | } 155 | 156 | QComboBox[editable="false"], 157 | QComboBox[editable="true"]::drop-down { 158 | border-image: url(:/images/pushbutton.png) 5; 159 | border-width: 5; 160 | } 161 | 162 | QComboBox[editable="false"]:hover, 163 | QComboBox[editable="true"]::drop-down:hover, QMenuBar::item:hover { 164 | border-image: url(:/images/pushbutton_hover.png) 5; 165 | border-width: 5; 166 | } 167 | 168 | QComboBox[editable="false"]:on, 169 | QComboBox[editable="true"]::drop-down:on, QMenuBar::item:on { 170 | border-image: url(:/images/pushbutton_pressed.png) 5; 171 | border-width: 5; 172 | } 173 | 174 | /* Customize read-only comboboxes. */ 175 | 176 | QPushButton 177 | { 178 | border-image: url(:/images/b3.png); 179 | border-width: 2; 180 | color:white; 181 | } 182 | QPushButton:hover{ 183 | border-image: url(:/images/b1.png) 5; 184 | border-width: 2; 185 | color:white; 186 | } 187 | 188 | QPushButton:pressed{ 189 | border-image: url(:/images/b3.png) 5; 190 | border-width: 2; 191 | color:white; 192 | } 193 | QComboBox[editable="false"] { 194 | padding-left: 3px; 195 | padding-right: 20px; /* space for the arrow */ 196 | 197 | } 198 | 199 | QComboBox[editable="false"]::drop-down { 200 | subcontrol-origin: padding; 201 | subcontrol-position: top right; 202 | width: 15px; 203 | border-left-style: solid; 204 | border-left-color: darkgray; 205 | border-left-width: 1px; 206 | 207 | } 208 | 209 | QComboBox[editable="false"]::down-arrow { 210 | subcontrol-origin: content; 211 | subcontrol-position: center; 212 | position: relative; 213 | left: 1px; /* 1 pixel dropdown border */ 214 | } 215 | 216 | /* The combobox arrow is on when the popup is open. */ 217 | QComboBox[editable="false"]::down-arrow:on { 218 | position: relative; 219 | top: 1px; 220 | left: 2px; 221 | } 222 | 223 | /* Customize editable comboboxes. */ 224 | 225 | QComboBox[editable="true"] { 226 | padding-right: 16px; 227 | 228 | } 229 | 230 | QComboBox[editable="true"]::drop-down { 231 | subcontrol-origin: border; 232 | subcontrol-position: top right; 233 | width: 13px; 234 | position: absolute; 235 | top: 2px; 236 | bottom: 2px; 237 | right: 2px; 238 | 239 | } 240 | 241 | QComboBox[editable="true"]::drop-down, 242 | QComboBox[editable="true"]::drop-down:hover, 243 | QComboBox[editable="true"]::drop-down:on { 244 | border-width: 0px; 245 | border-left-width: 3px; /* we need only left and center part */ 246 | 247 | } 248 | 249 | /* Shift the arrow when it's open. */ 250 | QComboBox[editable="true"]::down-arrow:on { 251 | position: relative; 252 | top: 1px; 253 | left: 1px; 254 | 255 | } 256 | 257 | /* Customize check boxes. */ 258 | QCheckBox { 259 | spacing: 5px; 260 | } 261 | 262 | QCheckBox::indicator { 263 | width: 13px; 264 | height: 13px; 265 | } 266 | 267 | QCheckBox::indicator:unchecked { 268 | image: url(:/images/checkbox_unchecked.png); 269 | } 270 | 271 | QCheckBox::indicator:unchecked:hover { 272 | image: url(:/images/checkbox_unchecked_hover.png); 273 | } 274 | 275 | QCheckBox::indicator:unchecked:pressed { 276 | image: url(:/images/checkbox_unchecked_pressed.png); 277 | } 278 | 279 | QCheckBox::indicator:checked { 280 | image: url(:/images/checkbox_checked.png); 281 | } 282 | 283 | QCheckBox::indicator:checked:hover { 284 | image: url(:/images/checkbox_checked_hover.png); 285 | } 286 | 287 | QCheckBox::indicator:checked:pressed { 288 | image: url(:/images/checkbox_checked_pressed.png); 289 | } 290 | 291 | /* Customize the size grip. */ 292 | QSizeGrip { 293 | image: url(:/images/sizegrip.png); 294 | width: 16px; 295 | height: 16px; 296 | } 297 | 298 | /* Customize the menu bar. */ 299 | QMenuBar { 300 | border-image: none; 301 | border-style: none; 302 | border-width: 1px; 303 | border-bottom-style: solid; 304 | border-bottom-color: darkslategray; 305 | padding: 2px; 306 | } 307 | 308 | /* Customize spin boxes. */ 309 | 310 | QSpinBox { 311 | padding-right: 15px; 312 | } 313 | 314 | QSpinBox::up-button { 315 | subcontrol-origin: border; 316 | subcontrol-position: top right; 317 | 318 | width: 16px; /* 16 + 2*1px border-width = 15px padding + 3px parent border */ 319 | border-image: url(:/images/spinup.png) 1; 320 | border-width: 1px; 321 | } 322 | 323 | QSpinBox::up-button:hover { 324 | border-image: url(:/images/spinup_hover.png) 1; 325 | } 326 | 327 | QSpinBox::up-button:pressed { 328 | border-image: url(:/images/spinup_pressed.png) 1; 329 | } 330 | 331 | QSpinBox::down-button { 332 | subcontrol-origin: border; 333 | subcontrol-position: bottom right; 334 | 335 | width: 16px; 336 | border-image: url(:/images/spindown.png) 1; 337 | border-width: 1px; 338 | border-top-width: 0; 339 | } 340 | 341 | QSpinBox::down-button:hover { 342 | border-image: url(:/images/spindown_hover.png) 1; 343 | } 344 | 345 | QSpinBox::down-button:pressed { 346 | border-image: url(:/images/spindown_pressed.png) 1; 347 | } 348 | -------------------------------------------------------------------------------- /BlackRicovery 2.0 GUI Src/dataheader.h: -------------------------------------------------------------------------------- 1 | #ifndef DATAHEADER_H 2 | #define DATAHEADER_H 3 | 4 | 5 | char mbr_header[2] = {0x55,0xaa}; 6 | 7 | char jpg_header_app0[4]= { 0xff,0xd8,0xff,0xe0}; 8 | char jpg_header_app1[4]= { 0xff,0xd8,0xff,0xe1}; 9 | char jpg_header_com[4]= { 0xff,0xd8,0xff,0xfe}; 10 | char jpg_footer[2]= { 0xff,0xd9}; 11 | char jpg_header_app0_avi[0x14]= { 0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 'A', 'V', 'I', '1', 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; 12 | 13 | char gif_header[6]= { 'G','I','F','8','7','a'}; 14 | char gif_header2[6]= { 'G','I','F','8','9','a'}; 15 | char gif_footer[2]= {0x00, 0x3b}; 16 | 17 | char exe_header[2] = {'M','Z'}; 18 | 19 | char png_header[8]= { 0x89, 'P', 'N','G', 0x0d, 0x0a, 0x1a, 0x0a}; 20 | char mng_header[8]= { 0x8a, 'M', 'N','G', 0x0d, 0x0a, 0x1a, 0x0a}; 21 | char jng_header[8]= { 0x8b, 'J', 'N','G', 0x0d, 0x0a, 0x1a, 0x0a}; 22 | char mng_footer[4]= {'M','E','N','D'}; 23 | char png_footer[4]= {'I','E','N','D'}; 24 | char jng_footer[4]= {'J','E','N','D'}; 25 | 26 | char id3_header[3]= {'I','D','3'}; 27 | char mp3_header[1]= {0xFF}; 28 | 29 | char rar_header[7]={0x52, 0x61, 0x72, 0x21, 0x1a, 0x07, 0x00 }; 30 | char rar_footer[7]={0xc4, 0x3d, 0x7b, 0x00, 0x40, 0x07, 0x00 }; 31 | 32 | char zip_header[4] = { 'P', 'K', 0x03, 0x04}; 33 | char zip_header2[8] = { 'P', 'K', '0', '0', 'P', 'K', 0x03, 0x04}; 34 | 35 | char header_7z[6] = {'7','z', 0xbc, 0xaf, 0x27, 0x1c}; 36 | 37 | char ctg_header[7]= {':','\\','D','C','I','M','\\'}; 38 | 39 | char cwk_header[4]= {'B','O','B','O'}; 40 | char cwk_footer[4]= {0xf0, 0xf1, 0xf2, 0xf3}; 41 | 42 | char a_header[8] = { '!','<','a','r','c','h','>','\n'}; 43 | 44 | char deb_header_debian[14] = { '!','<','a','r','c','h','>','\n','d','e','b','i','a','n'}; 45 | 46 | char ab_header[2]={ 'L', 'J' }; 47 | 48 | char abcdp_header[8]= { 'b', 'p', 'l', 'i', 's', 't', '0', '0'}; 49 | 50 | char ace_header[7] = { '*','*','A','C','E','*','*'}; 51 | 52 | char ahn_header[4] = {'d','b','f',0x00}; 53 | char ahn_magic[10] = {'A','H','N','E','N','B','L','A','T','T'}; 54 | 55 | char aif_header[4]= {'F','O','R','M'}; 56 | 57 | char all_header[8]= { 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x06, 0x04}; 58 | 59 | char als_header[5]= { 0xab, 0x1e, 'V', 'x', 0x03 }; 60 | char als_header2[13]= { 0x0c, 'L', 'i', 'v', 'e', 'D', 'o', 'c','u', 'm', 'e', 'n', 't'}; 61 | char als_footer[0x16]= {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,0x80, 0x00, 0x00, 0x00, 0x80, 0x01}; 62 | 63 | char amd_header[16]={ 'L', 'i', 'c', 'o', 'm', '-', 'A', 'P', 'S', ' ', 'F', 'i', 'l', 'e', ' ', 'V' }; 64 | 65 | char amt_header[20]={ 'L', 'i', 'c', 'o', 'm', '-', 'A', 'P', 'S', ' ', 'T', 'o', 'o', 'l', ' ', 'F', 'i', 'l', 'e', ' '}; 66 | 67 | char amr_header[6]= {'#','!','A','M','R','\n'}; 68 | 69 | char apa_magic[16]= { 'c', 'o', 'm', '.', 'a', 'p', 'a', '.', 'D', 'o', 'c', 'u', 'm', 'e', 'n', 't'}; 70 | 71 | char ape_header[4]= { 'M', 'A', 'C', ' '}; 72 | 73 | char apple_header[8]= { 0x00, 0x05, 0x16, 0x07, 0x00, 0x02, 0x00, 0x00}; 74 | 75 | char arj_header[2]={0x60, 0xEA}; 76 | char arj_footer[4]={0x60, 0xEA, 0x00, 0x00 }; 77 | 78 | char asf_header[4]= { 0x30,0x26,0xB2,0x75}; 79 | 80 | char asm_header[16]= { '#', 'U', 'G', 'C', ':', '2', ' ', 'A', 'S', 'S', 'E', 'M', 'B', 'L', 'Y', ' '}; 81 | char asm_footer[11]= {'#', 'E', 'N', 'D', '_', 'O', 'F', '_', 'U', 'G', 'C'}; 82 | 83 | char atd_header[16]= {'A' ,'B' ,'S' ,'0' ,'L' ,'U' ,'T' ,'E' ,'D' ,'A' ,'T' ,'A' ,'B' ,'A' ,'S' ,'E' }; 84 | 85 | char au_header[4]= {'.','s','n','d'}; 86 | 87 | char bkf_header[4]= { 'T','A','P','E'}; 88 | 89 | char blend_header[7] = { 'B', 'L', 'E', 'N', 'D', 'E', 'R'}; 90 | char blend_header_footer[4] = { 'E', 'N', 'D', 'B'}; 91 | 92 | char bmp_header[2]= {'B','M'}; 93 | 94 | char bz2_header[3]= {'B','Z','h'}; 95 | 96 | char cab_header[4] = { 'M','S','C','F'}; 97 | 98 | char cam_header[4]= {0x07, 0x20, 'M', 'M'}; 99 | 100 | char chm_header[16]={ 'I', 'T', 'S', 'F', 0x03, 0x00, 0x00, 0x00,0x60, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00}; 101 | 102 | char class_magic[4]= { 0xCA, 0xFE, 0xBA, 0xBE }; 103 | 104 | char cm_header[8] = { 'f','L','m','C','0','0','0','1'}; 105 | 106 | char compress_header[10] = {'S', 'Z', 'D', 'D', 0x88, 0xf0, 0x27, 0x33, 'A', 0x00}; 107 | 108 | char crw_header_be[2]= {'I','I'}; 109 | char crw_header_le[2]= {'M','M'}; 110 | char crw_footer[2]= { 0x0A, 0x30}; 111 | 112 | char evt_header[8]= {0x30, 0x00, 0x00, 0x00, 'L', 'f', 'L', 'e'}; 113 | 114 | char ext2_sb_header[2]= {0x53, 0xEF}; 115 | 116 | char d2s_header[8]= {0x55, 0xaa, 0x55, 0xaa, 0x60, 0x00, 0x00, 0x00}; 117 | 118 | char dat_header[8]= {0x30, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; 119 | char datIE_header[0x1c]= {'C', 'l', 'i', 'e', 'n', 't', ' ', 'U', 'r', 'l', 'C', 'a', 'c', 'h', 'e', ' ','M', 'M', 'F', ' ', 'V', 'e', 'r', ' ','5', '.', '2', 0x00}; 120 | 121 | char DB_header[6]= {0x19, 0x01, 0x00, 0x08, 0x02, 0x20}; 122 | 123 | char dbf_header[1]= {0x3}; 124 | 125 | char dim_header[4]= { 'S', 'P','C','I'}; 126 | 127 | char *dir_header=(char *)". "; 128 | 129 | char djv_header[8]= { 'A','T','&','T','F','O','R','M'}; 130 | 131 | char doc_header[8]= { 0xd0, 0xcf, 0x11, 0xe0, 0xa1, 0xb1, 0x1a, 0xe1}; 132 | char doc_footer[14]= {0x57, 0x6F, 0x72, 0x64, 0x2E, 0x44, 0x6F, 0x63, 0x75, 0x6D, 0x65, 0x6E, 0x74, 0x2E}; 133 | char xls_footer[28]= {0xFE, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x57, 0x00, 0x6F, 0x00, 0x72, 0x00, 0x6B, 0x00, 0x62, 0x00, 0x6F, 0x00, 0x6F, 0x00 , 0x6B, 0x00}; 134 | char ppt_footer[37]= {0x50, 0x00, 0x6F, 0x00, 0x77, 0x00, 0x65, 0x00, 0x72, 0x00, 0x50, 0x00, 0x6F, 0x00, 0x69, 0x00, 0x6E, 0x00, 0x74, 0x00, 0x20, 0x00, 0x44, 0x00, 0x6F, 0x00, 0x63, 0x00, 0x75, 0x00, 0x6D, 0x00, 0x65, 0x00, 0x6E, 0x00, 0x74}; 135 | 136 | char sdpx_header[4]= {'S', 'D', 'P', 'X'}; 137 | char xpds_header[4]= {'X', 'P', 'D', 'S'}; 138 | char ver10[8]= {'V', '1', '.', '0', 0x00, 0x00, 0x00, 0x00}; 139 | 140 | char drw_header[14]= {'#', 'U', 'G', 'C', ':', '2', ' ', 'D','R', 'A', 'W', 'I', 'N', 'G'}; 141 | char drw_footer[11]= {'#', 'E', 'N', 'D', '_', 'O', 'F', '_','U', 'G', 'C'}; 142 | 143 | char ds2_header[4]= { 0x03, 'd','s','2'}; 144 | 145 | char dsc_header[3]= { 'M','L','T'}; 146 | 147 | char dss_header[4]= { 0x02, 'd','s','s'}; 148 | 149 | char dta_header_71le[3]= {0x71, 0x02, 0x01}; 150 | char dta_header_72le[3]= {0x72, 0x02, 0x01}; 151 | 152 | char dump_header_le_old_fs[4] = { 0x6b, 0xea, 0x00, 0x00}; 153 | char dump_header_le_new_fs[4] = { 0x6c, 0xea, 0x00, 0x00}; 154 | 155 | char dv_header[3]= {0x1f, 0x07, 0x00}; 156 | 157 | char dwg_header_12[11]= {'A', 'C', '1', '0', '1', '2', 0x00, 0x00, 0x00, 0x00, 0x00}; 158 | char dwg_header_13[11]= {'A', 'C', '1', '0', '1', '3', 0x00, 0x00, 0x00, 0x00, 0x00}; 159 | char dwg_header_14[11]= {'A', 'C', '1', '0', '1', '4', 0x00, 0x00, 0x00, 0x00, 0x00}; 160 | char dwg_header_15[11]= {'A', 'C', '1', '0', '1', '5', 0x00, 0x00, 0x00, 0x00, 0x00}; 161 | 162 | char header_dxflib[10]= {'9', '9', '9', '\n', 'd', 'x', 'f', 'l', 'i', 'b'}; 163 | char header_dxflib_dos[11]= {'9', '9', '9', '\r', '\n','d', 'x', 'f', 'l', 'i', 'b'}; 164 | char header_dxf[11]= {' ', ' ', '0', '\n','S', 'E', 'C', 'T', 'I', 'O', 'N'}; 165 | char header_dxf_dos[12]= {' ', ' ', '0', '\r', '\n', 'S', 'E', 'C', 'T', 'I', 'O', 'N'}; 166 | char dxf_footer[4]= {'\n', 'E', 'O', 'F'}; 167 | 168 | char edb_magic[8]= { 0xef, 0xcd, 0xab, 0x89, 0x20, 0x06, 0x00, 0x00}; 169 | 170 | char elf_header[4] = { 0x7f, 'E','L','F'}; 171 | 172 | char emf_header[4]= { 0x01, 0x00, 0x00, 0x00}; 173 | char emf_sign[4]= { ' ','E', 'M','F'}; 174 | 175 | char fbk_header[10] = {'T','a','b','l','e','D','a','t','a',' '}; 176 | 177 | char fcp_header[5]= { 0xA2, 'K','e','y','G'}; 178 | 179 | char fcs_signature[6]= {'F','C','S','3','.','0'}; 180 | 181 | char fdb_header[7] = { 0x00, 0x00, 0x00, 0x5c, 0xa0, 0x83, 0x02}; 182 | 183 | char fh5_header[8] = { 0x41, 0x47, 0x44, 0x31, 0xbe, 0xb8, 0xbb, 0xce }; 184 | 185 | char fh10_header[] = { 0x1c, 0x01 ,0x00, 0x00, 0x02, 0x00, 0x04, 0x1c, 0x01 , 0x14, 0x00, 0x02, 0x00, 0x14, 0x1c, 0x01, 0x16, 0x00 ,0x02, 0x00, 0x08, 0x1c, 0x01, 0x1e, 0x00 , 0xa , 0x46, 0x72, 0x65, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x31, 0x30}; 186 | 187 | char fits_header[9]= { 'S','I','M','P','L','E',' ',' ','='}; 188 | 189 | char flac_header[4]= {'f', 'L', 'a', 'C'}; 190 | 191 | char flp_header[8]= {'F', 'L', 'h', 'd', 0x06, 0x00, 0x00, 0x00}; 192 | 193 | char flv_header[4]= {'F', 'L', 'V', 0x01}; 194 | 195 | char sign_navnl[5] = {'N','A','V','N','L'}; 196 | char sign_navw[4] = {'N','A','V','W'}; 197 | char magic_codeunit[9] = {'C','o','d','e','u','n','i','t',' '}; 198 | char magic_dataport[9] = {'D','a','t','a','p','o','r','t',' '}; 199 | char magic_form[5] = {'F','o','r','m',' '}; 200 | char magic_menusuite[10] = {'M','e','n','u','S','u','i','t','e',' '}; 201 | char magic_report[7] = {'R','e','p','o','r','t',' '}; 202 | char magic_table[6] = {'T','a','b','l','e',' '}; 203 | char magic_xmlport[8] = {'X','M','L','p','o','r','t',' '}; 204 | 205 | char fp7_header[0x14]= { 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x05, 0x00, 0x02, 0x00, 0x02, 0xc0, 'H', 'B', 'A', 'M', '7'}; 206 | 207 | char frm_header[14]= { '#', 'U', 'G', 'C', ':', '2', ' ', 'D', 'W', 'G', 'F', 'O', 'R', 'M'}; 208 | char frm_footer[11]= { '#', 'E', 'N', 'D', '_', 'O', 'F', '_', 'U', 'G', 'C'}; 209 | 210 | char fs_header[4]={ 'F', 'S','2','1' }; 211 | 212 | char gho_header[3]= { 0xfe, 0xef, 0x01 }; 213 | char gho_header_next[8]= { 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 214 | 215 | char gz_header_magic[3]= {0x1F, 0x8B, 0x08}; 216 | 217 | char hds_header[20]= { 'W','i','t','h','o','u','t','F','r','e','e','S','p','a','c','e', 0x02, 0x00, 0x00, 0x00}; 218 | 219 | char hr9_header[17]= { 0xc0, 0xde, 0xca, 0xfe, 0x00, 0x00, 0x00, 0x00, 'H', 'e', 'r', 'e', 'd', 'i', 's', 0x99, 0x20}; 220 | char hr9_footer[4]= {0xc0, 0xde, 0xca, 0xfe}; 221 | 222 | char header_ico[4]= {0x00 , 0x00, 0x01, 0x00}; 223 | 224 | char ifo_header_vmg[12]= { 'D', 'V', 'D', 'V', 'I', 'D', 'E', 'O', '-', 'V', 'M', 'G'}; 225 | char ifo_header_vts[12]= { 'D', 'V', 'D', 'V', 'I', 'D', 'E', 'O', '-', 'V', 'T', 'S'}; 226 | 227 | char imb_header[15]= { 0x00, 0x00, 0x00, 'I','n','c','r','e','d','i','m','a','i','l',' '}; 228 | 229 | char indd_header[24]={ 0x06, 0x06, 0xed, 0xf5, 0xd8, 0x1d, 0x46, 0xe5, 0xbd, 0x31, 0xef, 0xe7, 0xfe, 0x74, 0xb7, 0x1d, 0x44, 0x4f, 0x43, 0x55, 0x4d, 0x45, 0x4e, 0x54 }; 230 | 231 | char iso_header[6]= { 0x01, 'C', 'D', '0', '0', '1'}; 232 | 233 | char itunes_header[8]= {'m', 'h', 'b', 'd', 0x68, 0x00, 0x00, 0x00}; 234 | 235 | char kdb_header[8]= {0x03, 0xd9, 0xa2, 0x9a, 0x65, 0xfb, 0x4b, 0xb5}; 236 | 237 | char ldf_header[4]= { 0x01, 0x0f, 0x00, 0x00 }; 238 | 239 | char lnk_header[20]= { 'L', 0x00, 0x00, 0x00, 0x01, 0x14, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }; 240 | 241 | char logic_header[12]= { 0xab, 0xc0, 0x47, 0x13, 0x05, 0x17, 0x00, 0x15, 0x00, 0x04, 0x00, 0x24}; 242 | 243 | char m2ts_header[4]= { 'H','D','M','V'}; 244 | char m2t_header[4] = { 'T','S','H','V'}; 245 | 246 | char max_header[4] = { 'V','i','G','F'}; 247 | 248 | char mb_header[8]= {'M','a','y','a','F','O','R','4'}; 249 | char mb_header2[8]= {'M','A','Y','A','F','O','R','4'}; 250 | char mp_header[8]= {'M','P','L','E','F','O','R','4'}; 251 | 252 | char mcd_header[11]= { 'V', 'e','c','t','o','r','W','o','r','k','s'}; 253 | 254 | char mdb_header[]= { 0x00, 0x01, 0x00, 0x00, 'S', 't', 'a', 'n', 'd','a','r','d',' ','J','e','t',' ', 'D','B', 0x00}; 255 | char accdb_header[]= { 0x00, 0x01, 0x00, 0x00, 'S', 't', 'a', 'n', 'd','a','r','d',' ','A','C','E',' ', 'D','B', 0x00}; 256 | 257 | char mdf_header[4]= { 0x01, 0x0f, 0x00, 0x00 }; 258 | 259 | char mfa_header[8]= { 'M', 'M', 'F', '2', 0x04, 0x00, 0x00, 0x00}; 260 | char mfa_footer[5]= {'!','D','N','E', '!'}; 261 | 262 | char mfg_header[16]= { '#', 'U', 'G', 'C', ':', '2', ' ', 'M', 'F', 'G', '_', 'A', 'S', 'S', 'E', 'M'}; 263 | char mfg_footer[11]= { '#', 'E', 'N', 'D', '_', 'O', 'F', '_', 'U', 'G', 'C'}; 264 | 265 | char mid_header[4] = { 'M','T','h','d'}; 266 | char mid_footer[3]= {0xff, 0x2f, 0x00}; 267 | 268 | char mk5_header[4]= { 0x36, 0xff, 0xff, 0xff }; 269 | char mk5_header2[4]= { 0x00, 0x40, 0x1c, 0x46 }; 270 | 271 | char mkv_header[4]= { 0x1a,0x45,0xdf,0xa3}; 272 | 273 | char mpg_header[3]= {0x00, 0x00, 0x01}; 274 | 275 | char mrw_header[4]= { 0x00,'M','R','M'}; 276 | 277 | char mus_header[18] = { 'E','N','I','G','M','A',' ','B','I','N','A','R','Y',' ','F','I','L','E' }; 278 | 279 | char mxf_header[11]= { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01, 0x0d, 0x01, 0x02}; 280 | 281 | char mysql_header[4]= {0xfe, 0xfe, 0x07, 0x01}; 282 | char mysql_header_def[2]= {0xfe, 0x01}; 283 | 284 | char njx_header[4]= {0x04, 'N', 'j', 0x0f}; 285 | char njx_footer[4]= {'N', 'J', '*', 0x04}; 286 | 287 | char nk2_header[8]= { 0x0d, 0xf0, 0xad, 0xba, 0x0a, 0x00, 0x00, 0x00 }; 288 | 289 | char ogg_header[4]= {'O','g','g','S'}; 290 | 291 | char one_header[16]= { 0xe4, 0x52, 0x5c, 0x7b, 0x8c, 0xd8, 0xa7, 0x4d, 0xae, 0xb1, 0x53, 0x78, 0xd0, 0x29, 0x96, 0xd3 }; 292 | 293 | char orf_header[4]= { 0x49, 0x49, 0x52, 0x53}; 294 | char orf_header2[4]= { 'I', 'I', 'R', 'O'}; 295 | 296 | char paf_header[11]= {'5', '0', '0', '\0', '5', '0', '0', '\0', 'P','A','F'}; 297 | 298 | char pap_header[] = {'P','A','P','1'}; 299 | 300 | char pcap_header[4] = {0xd4, 0xc3, 0xb2, 0xa1}; 301 | 302 | char pdf_header[6] = { '%','P','D','F','-','1'}; 303 | char pdf_footer[4]= { '%', 'E', 'O', 'F'}; 304 | 305 | char pfx_header[11]= { 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01}; 306 | 307 | char prc_header[16]= {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'a','p','p','l'}; 308 | 309 | char prt_header[12]= { '#', 'U', 'G', 'C', ':', '2', ' ', 'P', 'A', 'R', 'T', ' '}; 310 | char prt_footer[11]= { '#', 'E', 'N', 'D', '_', 'O', 'F', '_', 'U', 'G', 'C'}; 311 | 312 | char ps_header[11]= { '%','!','P','S','-','A','d','o','b','e','-'}; 313 | 314 | char psd_header[4]={'8','B','P','S' }; 315 | 316 | char psp_header[] = "Paint Shop Pro Image File"; 317 | 318 | char pst_header[4]= { '!','B','D','N'}; 319 | char dbx_header[4]= { 0xCF, 0xAD, 0x12, 0xFE }; 320 | char wab_header[16] = { 0x9c, 0xcb, 0xcb, 0x8d, 0x13, 0x75, 0xd2, 0x11, 0x91, 0x58, 0x00, 0xc0, 0x4f, 0x79, 0x56, 0xa4 }; 321 | 322 | char ptb_header[4]= {'p', 't', 'a', 'b'}; 323 | 324 | char pyc_15_magic[4]= { 0x99, 0x4e, '\r', '\n'}; 325 | char pyc_20_magic[4]= { 0x87, 0xc6, '\r', '\n'}; 326 | char pyc_21_magic[4]= { 0x2a, 0xeb, '\r', '\n'}; 327 | char pyc_22_magic[4]= { 0x2d, 0xed, '\r', '\n'}; 328 | char pyc_23_magic[4]= { 0x3b, 0xf2, '\r', '\n'}; 329 | char pyc_24_magic[4]= { 0x6d, 0xf2, '\r', '\n'}; 330 | char pyc_25_magic[4]= { 0xb3, 0xf2, '\r', '\n'}; 331 | 332 | char qbb_header[10]= {0x45, 0x86, 0x00, 0x00, 0x06, 0x00, 0x02, 0x00, 0x01, 0x00}; 333 | char qbw_header[4]= {0x56, 0x00, 0x00, 0x00}; 334 | 335 | char qdf_header[6] = { 0xAC, 0x9E, 0xBD, 0x8F, 0x00, 0x00}; 336 | 337 | char qxd_header[4]={'X','P','R','3' }; 338 | char qxp_header_be[6]={'I','I','X','P','R','3' }; 339 | char qxp_header_le[6]={'M','M','X','P','R','3' }; 340 | 341 | char ra_header[4] = { '.', 'r', 'a', 0xfd}; 342 | 343 | char raf_header[8]= {'F','U','J','I','F','I','L','M'}; 344 | 345 | char raw_header_contax[7]= {'A','R','E','C','O','Y','K'}; 346 | char raw_header_panasonic[4]= {'I','I','U','\0'}; 347 | 348 | char rdc_header[9]= {'D','S','C','-','I','m','a','g','e'}; 349 | 350 | char reg_header_nt[4] = { 'r','e','g','f'}; 351 | char reg_header_9x[4] = { 'C','R','E','G'}; 352 | 353 | char MS_res_header[9]= {0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0xFF}; 354 | 355 | char riff_header[4]= {'R','I','F','F'}; 356 | 357 | char rm_header[9] = { '.', 'R', 'M', 'F', 0x00, 0x00, 0x00, 0x12, 0x00}; 358 | 359 | char rns_header[] = "Propellerheads Reason Song File"; 360 | 361 | char rpm_header[5]= {0xed, 0xab, 0xee, 0xdb, 0x3}; 362 | 363 | char ses_magic[8]= { 'C', 'O', 'O', 'L', 'N', 'E', 'S', 'S'}; 364 | 365 | char sib_header[9]= {0x0F, 'S', 'I', 'B', 'E', 'L', 'I', 'U', 'S'}; 366 | 367 | char sit_header[14] = { '7','1','0','0',' ','3','.','3','D',' ','7','1','0','0'}; 368 | 369 | char skd_header[29]= { 'A', 'u', 't', 'o', 'S', 'k', 'e', 't', 'c', 'h', 0x20, 'd', 'r', 'a', 'w', 'i', 'n', 'g', 0x20, 'd', 'a', 't', 'a', 'b', 'a', 's', 'e', 0x0d, 0x0a }; 370 | 371 | char skp_header[32]= { 0xff, 0xfe, 0xff, 0x0e, 'S', 0x00, 'k', 0x00, 'e', 0x00, 't', 0x00, 'c', 0x00, 'h', 0x00, 'U', 0x00, 'p', 0x00, ' ', 0x00, 'M', 0x00, 'o', 0x00, 'd', 0x00, 'e', 0x00, 'l', 0x00 }; 372 | 373 | char sp31_header[8]= { 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; 374 | char sp32_header[8]= { 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; 375 | 376 | //char spe_header[4]= {0x67, 0x45, 0x23, 0x01}; 377 | 378 | char spf_header[12]= { 'S', 'P', 'F', 'I', 0x00, 0x02, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00}; 379 | 380 | char spss_header[4]= {'$', 'F', 'L', '2'}; 381 | 382 | char sqlite_header[15]= {'S','Q','L','i','t','e',' ','f','o','r','m','a','t',' ','3'}; 383 | 384 | char sqm_header[6]= { 'M', 'S', 'Q', 'M', 'x', 0x00}; 385 | 386 | char stl_header[6]={ 's', 'o', 'l', 'i', 'd', ' '}; 387 | char spaces[16] = { ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' }; 388 | 389 | char stuffit_header[7] = { 'S', 't', 'u', 'f', 'f', 'I', 't'}; 390 | 391 | char swf_header_compressed[3]= {'C','W','S'}; 392 | char swf_header[3]= {'F','W','S'}; 393 | 394 | char tar_header_gnu[6] = { 'u','s','t','a','r',0x00}; 395 | char tar_header_posix[8] = { 'u','s','t','a','r',' ',' ',0x00}; 396 | 397 | char tax_header[6]= { 'T', 'T', 'F', 'N', 0x01, 0x01}; 398 | 399 | char tib_header[4]= { 0xb4, 0x6e, 0x68, 0x44}; 400 | 401 | char tiff_header_be[4]= { 'M','M',0x00, 0x2a}; 402 | char tiff_header_le[4]= { 'I','I',0x2a, 0x00}; 403 | 404 | char tph_header[20]= { '#', 'U', 'G', 'C', ':', '2', ' ', 'M', 'F', 'G', '_', 'T', 'O', 'O', 'L', '_', 'P', 'A', 'T', 'H'}; 405 | char tph_footer[11]= { '#', 'E', 'N', 'D', '_', 'O', 'F', '_', 'U', 'G', 'C'}; 406 | 407 | char header_ttf[5]= {0x00 , 0x01, 0x00, 0x00, 0x00}; 408 | //txt files 409 | char header_adr[] = "Opera Hotlist version 2.0"; 410 | char header_bash[] = "#!/bin/bash"; 411 | char header_cls[24] = {'V','E','R','S','I','O','N',' ','1','.','0',' ','C','L','A','S','S','\r','\n','B','E','G','I','N'}; 412 | char header_cue[] = "REM GENRE "; 413 | char header_dc[] = "SC V10"; 414 | char header_dif[12] = { 'T', 'A', 'B', 'L', 'E', '\r', '\n', '0', ',', '1', '\r', '\n'}; 415 | char header_ers[] = "DatasetHeader Begin"; 416 | char header_ics[] = "BEGIN:VCALENDAR"; 417 | char header_imm[13] = {'M','I','M','E','-','V','e','r','s','i','o','n',':'}; 418 | char header_lyx[7] = {'#', 'L', 'y', 'X', ' ', '1', '.'}; 419 | char header_m3u[7] = {'#','E','X','T','M','3','U'}; 420 | char header_mail[5] = {'F','r','o','m',' '}; 421 | char header_msf[] = "// 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /DataRicoverySoft 1.0 GUI Src/DataRicoverySoft/DataRicoverySoft.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yang123vc/DataRecovery-1/3c82762305e5c8b87cdc7bba1fc7fc81a47a1653/DataRicoverySoft 1.0 GUI Src/DataRicoverySoft/DataRicoverySoft.rc -------------------------------------------------------------------------------- /DataRicoverySoft 1.0 GUI Src/DataRicoverySoft/DataRicoverySoft.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | {BF612B20-A7F7-4BB7-A705-B02667460F19} 40 | DataRicoverySoft 41 | 42 | 43 | 44 | Application 45 | true 46 | v110 47 | MultiByte 48 | 49 | 50 | Application 51 | false 52 | v110 53 | true 54 | MultiByte 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | Level3 70 | Disabled 71 | 72 | 73 | true 74 | AsInvoker 75 | 76 | 77 | 78 | 79 | Level3 80 | MaxSpeed 81 | true 82 | true 83 | 84 | 85 | true 86 | true 87 | true 88 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /DataRicoverySoft 1.0 GUI Src/DataRicoverySoft/DataRicoverySoft.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | 23 | 24 | Header Files 25 | 26 | 27 | Header Files 28 | 29 | 30 | Header Files 31 | 32 | 33 | Header Files 34 | 35 | 36 | Header Files 37 | 38 | 39 | Header Files 40 | 41 | 42 | Header Files 43 | 44 | 45 | Header Files 46 | 47 | 48 | Header Files 49 | 50 | 51 | Header Files 52 | 53 | 54 | Header Files 55 | 56 | 57 | Header Files 58 | 59 | 60 | Header Files 61 | 62 | 63 | 64 | 65 | Resource Files 66 | 67 | 68 | Resource Files 69 | 70 | 71 | 72 | 73 | Resource Files 74 | 75 | 76 | -------------------------------------------------------------------------------- /DataRicoverySoft 1.0 GUI Src/DataRicoverySoft/DataRicoverySoft.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WindowsLocalDebugger 5 | 6 | -------------------------------------------------------------------------------- /DataRicoverySoft 1.0 GUI Src/DataRicoverySoft/DriveList.h: -------------------------------------------------------------------------------- 1 | #ifndef DRIVESLIST_H 2 | #define DTIVELIST_H 3 | 4 | void ListDriveCB() 5 | { 6 | try 7 | { 8 | int drives,i=0; 9 | __int64 nFree, nTotal; 10 | char dName[20],volName[40]; 11 | char volumeName[MAX_PATH + 1]; 12 | 13 | drives = GetLogicalDrives(); 14 | while(drives != 0) 15 | { 16 | if((drives&1) == 1) 17 | { 18 | sprintf(dName,"%c:\\",'A'+i); 19 | if(GetDiskFreeSpaceEx(dName,(PULARGE_INTEGER)&nFree,(PULARGE_INTEGER)&nTotal,NULL)!= 0) 20 | { 21 | dn++; 22 | strcpy(Roster[dn].DriveChar,dName); 23 | 24 | // fprintf(WriteDrive,"\n%10s",dName); 25 | // nHDFree += nFree; 26 | // nHDTotal += nTotal; 27 | 28 | Roster[dn].FreeMemory = nFree; 29 | Roster[dn].TotelMemory = nTotal; 30 | 31 | // fprintf(WriteDrive,"%30u ", nFree/512); 32 | // fprintf(WriteDrive,"%30u ", nTotal/512); 33 | 34 | if(GetVolumeInformation( dName, NULL, 0, NULL, NULL, NULL, 35 | volName, 36 | sizeof(volName)) !=0) 37 | 38 | strcpy(Roster[dn].ValumeNamefs,volName); 39 | // fprintf(WriteDrive,"%20s",volName); 40 | /*--------------------------------------------------------------------*/ 41 | 42 | DWORD serialNumber = 0; 43 | DWORD maxComponentLen = 0; 44 | DWORD fileSystemFlags = 0; 45 | char fileSystemName[MAX_PATH + 1] = { 0 }; 46 | 47 | if (GetVolumeInformation( dName, volumeName, sizeof(volumeName), &serialNumber, 48 | &maxComponentLen, 49 | &fileSystemFlags, 50 | fileSystemName, 51 | sizeof(fileSystemName)) == TRUE) 52 | { 53 | if(strlen(volumeName) == 0) 54 | { 55 | char arr[20]; 56 | 57 | strcpy(Roster[dn].ValumeName,"No_Name"); 58 | 59 | strcpy(Roster[dn].DriveName,dName); 60 | strcat(Roster[dn].DriveName," (No_Name) " ); 61 | 62 | sprintf(arr,"%.3f GB",nFree/(1024*1024*1014.0)); 63 | 64 | strcat(Roster[dn].DriveName, arr); 65 | strcat(Roster[dn].DriveName, "/"); 66 | 67 | sprintf(arr,"%.3f GB",nTotal/(1024*1024*1014.0)); 68 | 69 | strcat(Roster[dn].DriveName, arr); 70 | 71 | } 72 | else 73 | { 74 | char arr[20]; 75 | strcpy(Roster[dn].ValumeName,volName); 76 | 77 | strcpy(Roster[dn].DriveName,dName); 78 | strcat(Roster[dn].DriveName," ( " ); 79 | strcat(Roster[dn].DriveName,volumeName); 80 | strcat(Roster[dn].DriveName," ) " ); 81 | 82 | sprintf(arr,"%.3f GB",nFree/(1024*1024*1014.0)); 83 | 84 | strcat(Roster[dn].DriveName, arr); 85 | strcat(Roster[dn].DriveName, "/"); 86 | 87 | sprintf(arr,"%.3f GB",nTotal/(1024*1024*1014.0)); 88 | 89 | strcat(Roster[dn].DriveName, arr); 90 | } 91 | 92 | 93 | } 94 | else 95 | { 96 | MessageBox (NULL, TEXT ("\nGetVolumeInformation() failed, Error !"), TEXT ("Error !"), MB_ICONERROR) ; 97 | exit(0); 98 | } 99 | 100 | /*--------------------------------------------------------------------*/ 101 | 102 | 103 | } 104 | } 105 | drives>>=1; 106 | i++; 107 | } 108 | 109 | // fclose(WriteDrive); 110 | } 111 | catch(int ex) 112 | { 113 | MessageBox (NULL, TEXT ("\nSoftware Error !"), TEXT ("Error !"), MB_ICONERROR) ; 114 | exit(0); 115 | } 116 | } 117 | 118 | #endif -------------------------------------------------------------------------------- /DataRicoverySoft 1.0 GUI Src/DataRicoverySoft/FatR.h: -------------------------------------------------------------------------------- 1 | #ifndef FATR_H 2 | #define FATR_H 3 | 4 | //#include 5 | //using namespace std; 6 | 7 | FILE *pFLogf; 8 | 9 | void ListDeleted(ULONG StartCluster) 10 | { 11 | ULONG Read; 12 | SDirectory SDir; 13 | ULONG RootDirectoryCluster = (fat32m.ResverdSector+fat32m.SectorPerFAT*fat32m.NumberOfFat+(fat32m.RootDir1stCluster-2)*fat32m.SectorsPerCluster +StartCluster)* fat32m.BytesPerSector ; 14 | ULARGE_INTEGER Offset; 15 | OVERLAPPED Overlap = {0}; 16 | 17 | Offset.QuadPart = RootDirectoryCluster ; 18 | Overlap.Offset = Offset.LowPart; 19 | 20 | if(ReadFile(hVolume1, &SDir, 512*16, &Read, &Overlap) == 0) 21 | { 22 | /* SetDlgItemText(MainW,IDC_STATIC2,"Drive Reading Error !"); 23 | exit(1);*/ 24 | 25 | } 26 | ULONG g; 27 | for(g =0;g<16*16;g++) 28 | { 29 | if((int)SDir.F[g].name[0] == 229 && (int)SDir.F[g].StartClusterNo != 0) 30 | fprintf(pFLogf,"\n %15u %30u Byte %10.3s %15.2f MB %20.8s ",SDir.F[g].StartClusterNo ,(SDir.F[g].FileLength),SDir.F[g].ext,(double)(SDir.F[g].FileLength)/(1024*1024),SDir.F[g].name); 31 | if((int)SDir.F[g].StartClusterNo != 0 && (int)SDir.F[g].FileLength == 4096 || (int)SDir.F[g].FileLength == 8192 ) 32 | { 33 | ListDeleted(((int)SDir.F[g].StartClusterNo-2)*fat32m.SectorsPerCluster); 34 | } 35 | } 36 | } 37 | void RecoverFilesFat1(char *Drive,unsigned long int Location,ULONGLONG sizez, char *Name) 38 | { 39 | 40 | char te[MAX_PATH]; 41 | sprintf(te,"Scanning Sector Number : %ld",Location); 42 | SetDlgItemText(MainW,IDC_STATIC2,te); 43 | sprintf(te,"Recoverd File : %d",++FileNo); 44 | SetDlgItemText(MainW,IDC_STATIC6,te); 45 | 46 | sprintf(te,"Copy File -> File Size :%ld KB .....", (sizez)/1024); 47 | SetDlgItemText(MainW,IDC_STATIC4,te); 48 | sprintf(te," File Found..., Save As %s",Name); 49 | SetDlgItemText(MainW,IDC_STATIC3,te); 50 | 51 | 52 | 53 | ULONG StartCluster = (fat32m.ResverdSector+fat32m.SectorPerFAT*fat32m.NumberOfFat+(fat32m.RootDir1stCluster-2)*fat32m.SectorsPerCluster+(Location-2)*fat32m.SectorsPerCluster)* fat32m.BytesPerSector ; 54 | HANDLE hSrc, hDest; 55 | DWORD dwRead, dwWritten; 56 | DWORD dwBytesRead, dwBytesWritten, dwPos ,pp; 57 | char pBuffer[512]; 58 | 59 | hSrc = CreateFile((LPCSTR)Drive, GENERIC_READ | GENERIC_WRITE , 60 | FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, 61 | OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); 62 | 63 | if (hSrc == INVALID_HANDLE_VALUE) 64 | { 65 | sprintf(er,"Unable to open :",Drive); 66 | SetDlgItemText(MainW,IDC_STATIC2,er); 67 | exit(1); 68 | } 69 | 70 | hDest = CreateFile( Name, GENERIC_WRITE , 71 | FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, 72 | CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); 73 | 74 | if (hDest == INVALID_HANDLE_VALUE) 75 | { 76 | cout << "Unable to create File : " <>24) | \ 10 | (((x)&0x00ff0000L)>>8) | \ 11 | (((x)&0x0000ff00L)<<8) | \ 12 | (((x)&0x000000ffL)<<24)) 13 | 14 | 15 | #define le32(x) ((((x)&0xff000000L)>>24) | \ 16 | (((x)&0x00ff0000L)>>8) | \ 17 | (((x)&0x0000ff00L)<<8) | \ 18 | (((x)&0x000000ffL)<<24)) 19 | #define be32(x) (x) 20 | 21 | 22 | int isstopt; 23 | 24 | // HBITMAP SelectionBG ; 25 | HBRUSH hbrBackground = NULL; 26 | HANDLE hSrc; 27 | HWND BtnStop ,BtnStart,wFileSystem,BtnQuick; 28 | HWND cbList,MainW; 29 | 30 | char ResultV[MAX_PATH]; 31 | char dDriveChar[MAX_PATH]; 32 | char Drive[9] = "\\\\.\\E:"; 33 | 34 | char er[MAX_PATH]; 35 | char buffer[512],filename1[MAX_PATH]; 36 | char Tfil[MAX_PATH]; 37 | char bu[40]; 38 | 39 | int nX1; 40 | int nY1; 41 | int c; 42 | int mb; 43 | int dn = -1 ; 44 | 45 | float Percent; 46 | 47 | DWORD dwRead; 48 | 49 | UINT64 FileNo = 0; 50 | unsigned long long start_file=0, end_file=0 ,loop = 0,file_size,i; 51 | 52 | __int64 dTotelMemory; 53 | 54 | RECT wRect1; 55 | 56 | typedef struct 57 | { 58 | char DriveChar[MAX_PATH]; 59 | char DriveName[MAX_PATH]; 60 | char ValumeNamefs[12]; 61 | char ValumeName[MAX_PATH]; 62 | __int64 FreeMemory; 63 | __int64 TotelMemory; 64 | } Player; 65 | 66 | Player Roster[]= { 0 }; 67 | 68 | int OthAll,All; 69 | int jpg,png,bmp,gif,tif,othI; 70 | int mp4,mkv,gp3,avi,flv,othV; 71 | int doc,xls,pdf,ppt,othD; 72 | int mp3,amr,id3,othA; 73 | int zip,rar,z7,OthC; 74 | int mdf,ldf,othdb; 75 | 76 | HWND ImageW,VideoW[6],DocW[5],AudioW[4],compressW[4],databW[2],AllW,OthAllW; 77 | 78 | 79 | int QAll,QSize,QsizeExt,Qext; 80 | 81 | #define AllDATA 1 82 | #define SizeCondation 2 83 | #define ExtensionCondation 3 84 | #define SizeAndExtension 4 85 | #define Recover 1 86 | #define ListDelete 0 87 | 88 | #define MAX_CHARS_PER_LINE 512 89 | #define MAX_TOKENS_PER_LINE 10 90 | HWND wBUTT; 91 | int ValumeFileSystem; 92 | 93 | fat32mbr fat32m ;//= {}; 94 | HANDLE hVolume1; 95 | 96 | 97 | 98 | #endif -------------------------------------------------------------------------------- /DataRicoverySoft 1.0 GUI Src/DataRicoverySoft/List Of Deleted File.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yang123vc/DataRecovery-1/3c82762305e5c8b87cdc7bba1fc7fc81a47a1653/DataRicoverySoft 1.0 GUI Src/DataRicoverySoft/List Of Deleted File.txt -------------------------------------------------------------------------------- /DataRicoverySoft 1.0 GUI Src/DataRicoverySoft/NtfsRicover.h: -------------------------------------------------------------------------------- 1 | #ifndef NTFSR_ 2 | #define NTFSR_ 3 | 4 | 5 | //#include 6 | //#include 7 | //#include 8 | //#include 9 | //#include 10 | 11 | #include "ntfs.h" 12 | 13 | 14 | 15 | #define FIXOFFSET(x, y) ((CHAR*)(x) + (y)) 16 | 17 | ULONG BytesPerFileRecord; 18 | UINT BytesPerCluster; 19 | BOOT_BLOCK BootBlk; 20 | PFILE_RECORD_HEADER MFT; 21 | HANDLE hVolume; 22 | FILE *pFLog; 23 | 24 | BOOL BitSet(PUCHAR Bitmap, ULONG Idx) 25 | { 26 | return (Bitmap[Idx >> 3] & (1 << (Idx & 7))) != 0; 27 | } 28 | 29 | void FixupUpdateSequenceArray(PFILE_RECORD_HEADER FileRecord) 30 | { 31 | PUSHORT UsAry = PUSHORT(FIXOFFSET(FileRecord, FileRecord->Ntfs.UsaOffset)); 32 | PUSHORT Sector = PUSHORT(FileRecord); 33 | 34 | for (ULONG Idx = 1; Idx < FileRecord->Ntfs.UsaCount; Idx++) 35 | { 36 | Sector[255] = UsAry[Idx]; 37 | Sector += 256; 38 | } 39 | } 40 | void ReadSector(ULONGLONG Sector, ULONG Cnt, PVOID Buffer) 41 | { 42 | ULARGE_INTEGER Offset; 43 | OVERLAPPED Overlap = {0}; 44 | ULONG ReadBytes, CntIdx = 0, NeedReadByte = Cnt * BootBlk.BytesPerSector; 45 | 46 | Offset.QuadPart = Sector * BootBlk.BytesPerSector; 47 | Overlap.Offset = Offset.LowPart; 48 | Overlap.OffsetHigh = Offset.HighPart; 49 | 50 | ReadFile(hVolume, Buffer, NeedReadByte, &ReadBytes, &Overlap); 51 | 52 | if(ReadBytes != NeedReadByte) 53 | { 54 | while(CntIdx < Cnt) 55 | { 56 | Overlap.Offset = Offset.LowPart; 57 | Overlap.OffsetHigh = Offset.HighPart; 58 | 59 | ReadFile(hVolume, Buffer, BootBlk.BytesPerSector, &ReadBytes, &Overlap); 60 | 61 | if(ReadBytes != BootBlk.BytesPerSector) 62 | { 63 | char te[MAX_PATH]; 64 | sprintf(te,"Read Sector failed: %d:%d:%d\n", Offset.LowPart, Cnt * BootBlk.BytesPerSector, ReadBytes); 65 | MessageBox(MainW,te,"Error !",MB_OK | MB_ICONERROR); 66 | return; 67 | } 68 | 69 | Buffer = (UCHAR*)Buffer + BootBlk.BytesPerSector; 70 | Offset.QuadPart += BootBlk.BytesPerSector; 71 | ++CntIdx; 72 | } 73 | } 74 | return; 75 | } 76 | 77 | void ReadLCN(ULONGLONG LCN, ULONG Cnt, PVOID Buffer) 78 | { 79 | ReadSector(LCN * BootBlk.SectorsPerCluster, Cnt * BootBlk.SectorsPerCluster, Buffer); 80 | } 81 | 82 | 83 | ULONG AttributeLength(PATTRIBUTE Attr) 84 | { 85 | return Attr->Nonresident == FALSE 86 | ? PRESIDENT_ATTRIBUTE(Attr)->ValueLength: ULONG(PNONRESIDENT_ATTRIBUTE(Attr)->DataSize); 87 | } 88 | 89 | ULONG AttributeLengthAllocated(PATTRIBUTE Attr) 90 | { 91 | 92 | return Attr->Nonresident == FALSE? PRESIDENT_ATTRIBUTE(Attr)->ValueLength: 93 | ULONG(PNONRESIDENT_ATTRIBUTE(Attr)->AllocatedSize); 94 | } 95 | 96 | ULONG RunLength(PUCHAR Run) 97 | { 98 | return (*Run & 0xf) + ((*Run >> 4) & 0xf) + 1; 99 | } 100 | 101 | ULONGLONG RunCount(PUCHAR Run) 102 | { 103 | 104 | UCHAR Idx = *Run & 0xF; 105 | ULONGLONG Cnt = 0; 106 | 107 | for (; Idx > 0; Idx--) 108 | Cnt = (Cnt << 8) + Run[Idx]; 109 | return Cnt; 110 | } 111 | 112 | LONGLONG RunLCN(PUCHAR Run) 113 | { 114 | UCHAR VCNNumEndIdx = *Run & 0xf; 115 | UCHAR LCNIdxValNum = (*Run >> 4) & 0xf; 116 | 117 | LONGLONG LCN = LCNIdxValNum == 0 ? 0 : CHAR(Run[VCNNumEndIdx + LCNIdxValNum]); 118 | 119 | for (LONG Idx = VCNNumEndIdx + LCNIdxValNum - 1; Idx > VCNNumEndIdx; Idx--) 120 | LCN = (LCN << 8) + Run[Idx]; 121 | return LCN; 122 | } 123 | 124 | BOOL FindRun(PNONRESIDENT_ATTRIBUTE Attr, ULONGLONG VCN, PULONGLONG LCN, PULONGLONG Cnt) 125 | { 126 | INT Idx; 127 | 128 | if (VCN < Attr->LowVcn || VCN > Attr->HighVcn) 129 | return FALSE; 130 | 131 | *LCN = 0; 132 | ULONGLONG Base = Attr->LowVcn; 133 | 134 | PUCHAR Run = PUCHAR(FIXOFFSET(Attr, Attr->RunArrayOffset)); 135 | 136 | for (Idx = 0; *Run != 0; Run += RunLength(Run), ++Idx) 137 | { 138 | *LCN += RunLCN(Run); 139 | *Cnt = RunCount(Run); 140 | 141 | if (Base <= VCN && VCN < Base + *Cnt) 142 | { 143 | *LCN = RunLCN(Run) == 0 ? 0 : *LCN + VCN - Base; 144 | *Cnt -= ULONG(VCN - Base); 145 | return TRUE; 146 | } 147 | else 148 | { 149 | Base += *Cnt; 150 | } 151 | } 152 | *Cnt = 0; 153 | return FALSE; 154 | } 155 | 156 | 157 | void ReadExternalAttribute(PNONRESIDENT_ATTRIBUTE Attr, ULONGLONG VCN, ULONG Cnt, PVOID Buffer) 158 | { 159 | ULONGLONG LCN, RunClstrCnt; 160 | ULONG RdCnt, Left; 161 | PUCHAR DataPtr = PUCHAR(Buffer); 162 | 163 | for (Left = Cnt; Left > 0; Left -= RdCnt) 164 | { 165 | FindRun(Attr, VCN, &LCN, &RunClstrCnt); 166 | 167 | RdCnt = ULONG(min(RunClstrCnt, Left)); 168 | ULONG RdBytes = RdCnt * BytesPerCluster; 169 | 170 | if (LCN == 0) 171 | { 172 | memset(DataPtr, 0, RdBytes); 173 | } 174 | else 175 | { 176 | ReadLCN(LCN, RdCnt, DataPtr); 177 | } 178 | 179 | VCN += RdCnt; 180 | DataPtr += RdBytes; 181 | } 182 | } 183 | 184 | void ReadAttribute(PATTRIBUTE Attr, PVOID Buffer) 185 | { 186 | if (Attr->Nonresident == FALSE) 187 | { 188 | PRESIDENT_ATTRIBUTE RAttr = PRESIDENT_ATTRIBUTE(Attr); 189 | memcpy(Buffer, FIXOFFSET(RAttr, RAttr->ValueOffset), RAttr->ValueLength); 190 | } 191 | else 192 | { 193 | PNONRESIDENT_ATTRIBUTE NAttr = PNONRESIDENT_ATTRIBUTE(Attr); 194 | ReadExternalAttribute(NAttr, 0, ULONG(NAttr->HighVcn) + 1, Buffer); 195 | } 196 | } 197 | 198 | PATTRIBUTE FindAttribute(PFILE_RECORD_HEADER FileRecord, ATTRIBUTE_TYPE Tp, PWSTR Name) 199 | { 200 | for (PATTRIBUTE Attr = PATTRIBUTE(FIXOFFSET(FileRecord, FileRecord->AttributesOffset)); 201 | Attr->AttributeType != -1; 202 | Attr = PATTRIBUTE(FIXOFFSET(Attr, Attr->Length))) 203 | { 204 | if (Attr->AttributeType == Tp) 205 | { 206 | if (Name == 0 && Attr->NameLength == 0) 207 | { 208 | return Attr; 209 | } 210 | 211 | if (Name != 0 && wcslen(Name) == Attr->NameLength 212 | && _wcsicmp(Name, PWSTR(FIXOFFSET(Attr, Attr->NameOffset))) == 0) 213 | { 214 | return Attr; 215 | } 216 | } 217 | } 218 | return NULL; 219 | } 220 | 221 | PATTRIBUTE FindAttributeFileName(PFILE_RECORD_HEADER FileRecord, PWSTR Name) 222 | { 223 | PATTRIBUTE AttrCp = NULL; 224 | PFILENAME_ATTRIBUTE FileName; 225 | 226 | for (PATTRIBUTE Attr = PATTRIBUTE(FIXOFFSET(FileRecord, FileRecord->AttributesOffset)); 227 | Attr->AttributeType != -1; 228 | Attr = PATTRIBUTE(FIXOFFSET(Attr, Attr->Length))) 229 | { 230 | if (Attr->AttributeType == AttributeFileName) 231 | { 232 | 233 | if (Name == 0 && Attr->NameLength == 0) 234 | { 235 | AttrCp = Attr; 236 | FileName = PFILENAME_ATTRIBUTE(FIXOFFSET(AttrCp, 237 | PRESIDENT_ATTRIBUTE(AttrCp)->ValueOffset)); 238 | 239 | if(FileName->NameType == 1) 240 | return AttrCp; 241 | } 242 | 243 | if (Name != 0 && wcslen(Name) == Attr->NameLength 244 | && _wcsicmp(Name, PWSTR(FIXOFFSET(Attr, Attr->NameOffset))) == 0) 245 | { 246 | AttrCp = Attr; 247 | FileName = PFILENAME_ATTRIBUTE(FIXOFFSET(AttrCp, 248 | PRESIDENT_ATTRIBUTE(AttrCp)->ValueOffset)); 249 | 250 | if(FileName->NameType == 1) 251 | return AttrCp; 252 | } 253 | } 254 | } 255 | return AttrCp; 256 | } 257 | 258 | void ReadVCN(PFILE_RECORD_HEADER FileRecord, ATTRIBUTE_TYPE Tp, ULONGLONG VCN, ULONG Cnt, PVOID Buffer) 259 | { 260 | PNONRESIDENT_ATTRIBUTE Attr = PNONRESIDENT_ATTRIBUTE(FindAttribute(FileRecord, Tp, 0)); 261 | 262 | if (Attr == 0 || (VCN < Attr->LowVcn || VCN > Attr->HighVcn)) 263 | { 264 | PATTRIBUTE Attrlist = FindAttribute(FileRecord, AttributeAttributeList, 0); 265 | DebugBreak(); 266 | } 267 | ReadExternalAttribute(Attr, VCN, Cnt, Buffer); 268 | } 269 | 270 | ULONGLONG GetLCN(ULONG Idx) 271 | { 272 | ULONGLONG VCN = ULONGLONG(Idx) * BytesPerFileRecord / BytesPerCluster; 273 | PNONRESIDENT_ATTRIBUTE Attr = PNONRESIDENT_ATTRIBUTE(FindAttribute(MFT, AttributeData, 0)); 274 | ULONGLONG LCN, RunClstrCnt; 275 | 276 | if(FindRun(Attr, VCN, &LCN, &RunClstrCnt) == FALSE) 277 | return 0; 278 | return LCN; 279 | } 280 | 281 | void ReadFileRecord(ULONG Idx, PFILE_RECORD_HEADER FileRecord) 282 | { 283 | ULONG ClstrNum = BootBlk.ClustersPerFileRecord; 284 | 285 | if (ClstrNum > 0x80) 286 | ClstrNum = 1; 287 | PUCHAR BufPtr = new UCHAR[BytesPerCluster * ClstrNum]; 288 | 289 | ULONGLONG VCN = ULONGLONG(Idx) * BytesPerFileRecord / BytesPerCluster; 290 | 291 | ReadVCN(MFT, AttributeData, VCN, ClstrNum, BufPtr); 292 | 293 | LONG FRPerCluster = (BytesPerCluster / BytesPerFileRecord) - 1; 294 | ULONG FRIdx = FRPerCluster > 0 ? (Idx & FRPerCluster) : 0; 295 | 296 | memcpy(FileRecord, BufPtr + FRIdx * BytesPerFileRecord, BytesPerFileRecord); 297 | delete [] BufPtr; 298 | } 299 | 300 | void ListDeleted() 301 | { 302 | ULONG Idx; 303 | PATTRIBUTE Attr = (PATTRIBUTE)FindAttribute(MFT, AttributeBitmap, 0); 304 | PUCHAR Bitmap = new UCHAR[AttributeLengthAllocated(Attr)]; 305 | 306 | ReadAttribute(Attr, Bitmap); 307 | ULONG Num = AttributeLength(FindAttribute(MFT, AttributeData, 0)) / BytesPerFileRecord; 308 | 309 | fwprintf(pFLog, L"\nId Number File Size File Name \n\n"); 310 | 311 | PFILE_RECORD_HEADER FileRecord = PFILE_RECORD_HEADER(new UCHAR[BytesPerFileRecord]); 312 | 313 | for (Idx = 0; Idx < Num; Idx++) 314 | { 315 | if (BitSet(Bitmap, Idx)) 316 | continue; 317 | 318 | ReadFileRecord(Idx, FileRecord); 319 | FixupUpdateSequenceArray(FileRecord); 320 | 321 | if (FileRecord->Ntfs.Type == 'ELIF' && (FileRecord->Flags & 1) == 0) 322 | { 323 | Attr = (PATTRIBUTE)FindAttributeFileName(FileRecord, 0); 324 | if (Attr == 0) 325 | continue; 326 | 327 | PFILENAME_ATTRIBUTE Name = PFILENAME_ATTRIBUTE(FIXOFFSET(Attr, PRESIDENT_ATTRIBUTE(Attr)->ValueOffset)); 328 | fwprintf(pFLog, L"%8u, %12.2f MB, %ws\n", Idx, double((Name->AllocatedSize)/(1024*1024.0)), Name->Name); 329 | } 330 | } 331 | delete [] Bitmap; 332 | delete [] (UCHAR*)FileRecord; 333 | } 334 | 335 | void LoadMFT() 336 | { 337 | BytesPerCluster = BootBlk.SectorsPerCluster * BootBlk.BytesPerSector; 338 | BytesPerFileRecord = BootBlk.ClustersPerFileRecord < 0x80 339 | ? BootBlk.ClustersPerFileRecord * BytesPerCluster : (1 << (0x100 - BootBlk.ClustersPerFileRecord)); 340 | 341 | MFT = PFILE_RECORD_HEADER(new UCHAR[BytesPerFileRecord]); 342 | ReadSector(BootBlk.MftStartLcn * BootBlk.SectorsPerCluster,BytesPerFileRecord / BootBlk.BytesPerSector, MFT); 343 | FixupUpdateSequenceArray(MFT); 344 | } 345 | 346 | VOID UnloadMFT() 347 | { 348 | delete [] (UCHAR*)MFT; 349 | } 350 | 351 | void RecoverFile(ULONG Idx, LPCSTR NewFileName) 352 | { 353 | PFILE_RECORD_HEADER FileRecord = PFILE_RECORD_HEADER(new UCHAR[BytesPerFileRecord]); 354 | ULONG Written, BufferSize, DataSize, AllocatedSize; 355 | ReadFileRecord(Idx, FileRecord); 356 | FixupUpdateSequenceArray(FileRecord); 357 | 358 | if (FileRecord->Ntfs.Type != 'ELIF') 359 | { 360 | delete [] (UCHAR*)FileRecord; 361 | char te[MAX_PATH]; 362 | sprintf(te,"\nFailed. FileRecord->Ntfs.Type != 'ELIF'\n"); 363 | SetDlgItemText(MainW,IDC_STATIC3,te); 364 | return; 365 | } 366 | 367 | 368 | PATTRIBUTE Attr = FindAttribute(FileRecord, AttributeData, 0); 369 | 370 | if (Attr == 0) 371 | { 372 | delete [] (UCHAR*)FileRecord; 373 | char te[MAX_PATH]; 374 | sprintf(te,"\nFailed, Attribute == 0!\n"); 375 | SetDlgItemText(MainW,IDC_STATIC3,te); 376 | return; 377 | } 378 | 379 | DataSize = AttributeLength(Attr); 380 | AllocatedSize = AttributeLengthAllocated(Attr); 381 | BufferSize = AllocatedSize > DataSize ? AllocatedSize : DataSize; 382 | 383 | BufferSize = BufferSize / BootBlk.BytesPerSector * BootBlk.BytesPerSector + BootBlk.BytesPerSector; 384 | 385 | PUCHAR Buffer = new UCHAR[BufferSize]; 386 | 387 | ReadAttribute(Attr, Buffer); 388 | 389 | HANDLE hFile = CreateFile(NewFileName, GENERIC_WRITE, 0, 0, CREATE_ALWAYS, 0, 0); 390 | 391 | 392 | if(hFile == INVALID_HANDLE_VALUE) 393 | { 394 | char te[MAX_PATH]; 395 | sprintf(te,"\n RecoverFile() - CreateFile() failed, Error : %u\n", GetLastError()); 396 | MessageBox(MainW,te,"Error !",MB_OK | MB_ICONERROR); 397 | goto a1; 398 | } 399 | 400 | if(WriteFile(hFile, Buffer, DataSize, &Written, 0) == 0) 401 | { 402 | char te[MAX_PATH]; 403 | sprintf(te,"\n RecoverFile() - WriteFile() failed, Error : %u\n", GetLastError()); 404 | MessageBox(MainW,te,"Error !",MB_OK | MB_ICONERROR); 405 | goto a1; 406 | } 407 | 408 | if(Written != DataSize) 409 | { 410 | char te[MAX_PATH]; 411 | sprintf(te,"\n Writing The File Data failed !, Error %u\n", GetLastError()); 412 | SetDlgItemText(MainW,IDC_STATIC3,te); 413 | } 414 | 415 | a1: 416 | CloseHandle(hFile); 417 | delete [] Buffer; 418 | delete [] (UCHAR*)FileRecord; 419 | } 420 | 421 | void NtfsRecoverFile(char *Drive,unsigned long Idx,char *FileName,int Choice) 422 | { 423 | ULONG Read; 424 | LPCSTR OriFileName; 425 | char FileN[273]; 426 | 427 | // strcpy(FileN,"Recovered Files\\"); 428 | sprintf(FileN,"%s\\",Tfil); 429 | strcat(FileN,FileName); 430 | OriFileName = (LPCSTR)FileN; 431 | 432 | // _mkdir( "Recovered Files" ); 433 | 434 | pFLog = fopen("lodf.txt", "w"); 435 | 436 | hVolume = CreateFile( 437 | Drive, 438 | GENERIC_READ | GENERIC_WRITE , FILE_SHARE_READ | FILE_SHARE_WRITE, 439 | 0, 440 | OPEN_EXISTING, 441 | 0, 442 | 0); 443 | 444 | if( hVolume == INVALID_HANDLE_VALUE) 445 | { 446 | char te[MAX_PATH]; 447 | sprintf(te,"\n Unable To Open Drive : %u\n", GetLastError()); 448 | MessageBox(MainW,te,"Error !",MB_OK | MB_ICONERROR); 449 | goto a1; 450 | } 451 | 452 | if(ReadFile(hVolume, &BootBlk, sizeof(BOOT_BLOCK), &Read, 0) == 0) 453 | { 454 | char te[MAX_PATH]; 455 | sprintf(te,"\n Drive Reading Error ! : %u\n", GetLastError()); 456 | MessageBox(MainW,te,"Error !",MB_OK | MB_ICONERROR); 457 | goto a1; 458 | } 459 | if(Choice == 0) 460 | { 461 | LoadMFT(); 462 | ListDeleted(); 463 | } 464 | else if(Choice == 1) 465 | { 466 | LoadMFT(); 467 | ListDeleted(); 468 | 469 | RecoverFile(Idx, OriFileName); 470 | 471 | char te[MAX_PATH]; 472 | sprintf(te,"Scanning Sector Number : %ld",Idx); 473 | SetDlgItemText(MainW,IDC_STATIC2,te); 474 | sprintf(te,"Recoverd File : %d",++fileNo1); 475 | SetDlgItemText(MainW,IDC_STATIC6,te); 476 | } 477 | a1: 478 | UnloadMFT(); 479 | CloseHandle(hVolume); 480 | fclose(pFLog); 481 | } 482 | #endif -------------------------------------------------------------------------------- /DataRicoverySoft 1.0 GUI Src/DataRicoverySoft/RecoverTheFile.h: -------------------------------------------------------------------------------- 1 | #ifndef RECOVERTHEFILE_H 2 | #define RECOVERTHEFILE_H 3 | 4 | 5 | void Recover_the_file() 6 | { 7 | try 8 | { 9 | 10 | HANDLE hSrc ,hDest; 11 | DWORD dwRead, dwWritten; 12 | DWORD dwBytesRead, dwBytesWritten, dwPos ,pp; 13 | 14 | hSrc = CreateFile((LPCSTR)Drive, GENERIC_READ | GENERIC_WRITE , FILE_SHARE_READ|FILE_SHARE_WRITE, NULL,OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); 15 | if (hSrc == INVALID_HANDLE_VALUE) 16 | { 17 | 18 | sprintf(er,"Unable To Read Drive :%s",Drive); 19 | SetDlgItemText(MainW,IDC_STATIC3,er); 20 | MessageBox(MainW,er,"Error !",MB_OK | MB_ICONERROR); 21 | goto last1; 22 | } 23 | 24 | hDest = CreateFile(filename1, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); 25 | if (hDest == INVALID_HANDLE_VALUE) 26 | { 27 | sprintf(er,"Unable To Read File :%s",filename1); 28 | SetDlgItemText(MainW,IDC_STATIC3,er); 29 | goto last1; 30 | } 31 | 32 | 33 | 34 | sprintf(ResultV," File Found : %ld",FileNo); 35 | SetDlgItemText(MainW,IDC_STATIC6,ResultV); 36 | 37 | unsigned long i; 38 | /* FILE *fp; 39 | 40 | if((fp=fopen(filename1, "wb"))==NULL) 41 | { 42 | 43 | sprintf(er,"Unable To Read File :%s",filename1); 44 | SetDlgItemText(MainW,IDC_STATIC3,er); 45 | fclose(fp); 46 | goto last1; 47 | }*/ 48 | 49 | pp = SetFilePointer(hSrc,start_file*512, NULL, 0); 50 | if(pp == -1) 51 | { 52 | sprintf(er,"Unable To Read Drive :%s",Drive); 53 | SetDlgItemText(MainW,IDC_STATIC3,"Error Reading Sector ! "); 54 | goto last1; 55 | } 56 | 57 | if(start_file != end_file) 58 | { 59 | unsigned long long j = 0; 60 | for(i=start_file;i<=end_file;i++) 61 | { 62 | j++; 63 | 64 | sprintf(ResultV,"%d%%",(100*j)/(end_file-start_file)); 65 | SetDlgItemText(MainW,IDC_STATIC7,ResultV); 66 | 67 | 68 | ReadFile(hSrc, buffer, sizeof(buffer), &dwRead, NULL); 69 | WriteFile(hDest, buffer,sizeof(buffer), &dwWritten, NULL); 70 | 71 | // fwrite(buffer, sizeof(buffer),1, fp); 72 | } 73 | } 74 | 75 | // fclose(fp); 76 | 77 | last1: 78 | 79 | CloseHandle(hSrc); 80 | CloseHandle(hDest); 81 | } 82 | catch(char err[]) 83 | { 84 | MessageBox(MainW,err,"Error !",MB_OK | MB_ICONERROR); 85 | } 86 | } 87 | #endif -------------------------------------------------------------------------------- /DataRicoverySoft 1.0 GUI Src/DataRicoverySoft/Resource.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yang123vc/DataRecovery-1/3c82762305e5c8b87cdc7bba1fc7fc81a47a1653/DataRicoverySoft 1.0 GUI Src/DataRicoverySoft/Resource.aps -------------------------------------------------------------------------------- /DataRicoverySoft 1.0 GUI Src/DataRicoverySoft/Resource.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yang123vc/DataRecovery-1/3c82762305e5c8b87cdc7bba1fc7fc81a47a1653/DataRicoverySoft 1.0 GUI Src/DataRicoverySoft/Resource.rc -------------------------------------------------------------------------------- /DataRicoverySoft 1.0 GUI Src/DataRicoverySoft/fatmbr.h: -------------------------------------------------------------------------------- 1 | 2 | //#include 3 | 4 | #pragma pack(1) 5 | typedef struct 6 | { 7 | 8 | UCHAR Jump[3]; 9 | UCHAR Format[8]; 10 | USHORT BytesPerSector; 11 | UCHAR SectorsPerCluster; 12 | USHORT ResverdSector; 13 | UCHAR NumberOfFat; 14 | USHORT RootEntries; 15 | USHORT Sectors_SmallValues; 16 | UCHAR MediaType; 17 | USHORT SectorPerFat_SnallValue; 18 | USHORT SectorPreTrack; 19 | USHORT NumberOfHeads; 20 | ULONG HiddenSector; 21 | ULONG Sectors_LargeValues; 22 | ULONG SectorPerFAT; 23 | USHORT Flags; 24 | USHORT Version; 25 | ULONG RootDir1stCluster; 26 | USHORT FSInfoSector; 27 | USHORT BackupBootSector; 28 | UCHAR Reseverd[0xC]; 29 | UCHAR LogicDriveNo; 30 | UCHAR Unused; 31 | UCHAR ExtenedSignature; 32 | ULONG SerialNumber; 33 | UCHAR ValumeName[0xB]; 34 | UCHAR FATName[8]; 35 | UCHAR ExecutableCode[0x1A4]; 36 | USHORT BootSignature; 37 | 38 | }fat32mbr,*Pfat32mbr; 39 | 40 | /* 41 | #pragma pack(push, 1) 42 | typedef struct 43 | { 44 | 45 | UCHAR Jump[3]; 46 | UCHAR Format[8]; 47 | USHORT BytesPerSector; 48 | UCHAR SectorsPerCluster; 49 | USHORT ResverdSector; 50 | UCHAR NumberOfFat; 51 | USHORT RootEntries; 52 | USHORT Sectors_SmallValues; 53 | UCHAR MediaType; 54 | USHORT SectorPerFat_SnallValue; 55 | USHORT SectorPreTrack; 56 | USHORT NumberOfHeads; 57 | ULONG HiddenSector; 58 | ULONG Sectors_LargeValues; 59 | char DriveNo; 60 | char CurrentHead; 61 | char EBootSignature; 62 | ULONG VolumeSerialNo; 63 | UCHAR VolumeLable[11]; 64 | UCHAR FileSystem[8]; 65 | UCHAR Code[0x1C0]; 66 | USHORT BootSignature; 67 | }fat12mbr,*Pfat12mbr; 68 | 69 | #pragma pack(pop) 70 | */ 71 | #pragma pack(push, 1) 72 | typedef struct 73 | { 74 | UCHAR name[8],ext[3]; 75 | UCHAR Attribute; 76 | UCHAR Resverd[0xA]; 77 | USHORT FileTime; 78 | USHORT FileDate; 79 | USHORT StartClusterNo; 80 | ULONG FileLength; 81 | }DirectoryEntry,*PDiorectoryEntry; 82 | #pragma pack(pop) 83 | 84 | #pragma pack(push, 1) 85 | typedef struct 86 | { 87 | DirectoryEntry F[16*16]; 88 | 89 | }SDirectory; 90 | #pragma pack(pop) -------------------------------------------------------------------------------- /DataRicoverySoft 1.0 GUI Src/DataRicoverySoft/lodf.inf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yang123vc/DataRecovery-1/3c82762305e5c8b87cdc7bba1fc7fc81a47a1653/DataRicoverySoft 1.0 GUI Src/DataRicoverySoft/lodf.inf -------------------------------------------------------------------------------- /DataRicoverySoft 1.0 GUI Src/DataRicoverySoft/lodf.infor: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yang123vc/DataRecovery-1/3c82762305e5c8b87cdc7bba1fc7fc81a47a1653/DataRicoverySoft 1.0 GUI Src/DataRicoverySoft/lodf.infor -------------------------------------------------------------------------------- /DataRicoverySoft 1.0 GUI Src/DataRicoverySoft/ntfs.h: -------------------------------------------------------------------------------- 1 | ///ntfs.h 2 | 3 | typedef struct { 4 | ULONG Type; 5 | USHORT UsaOffset; 6 | USHORT UsaCount; 7 | USN Usn; 8 | } NTFS_RECORD_HEADER, *PNTFS_RECORD_HEADER; 9 | 10 | typedef struct { 11 | NTFS_RECORD_HEADER Ntfs; 12 | USHORT SequenceNumber; 13 | USHORT LinkCount; 14 | USHORT AttributesOffset; 15 | USHORT Flags; 16 | ULONG BytesInUse; 17 | ULONG BytesAllocated; 18 | ULONGLONG BaseFileRecord; 19 | USHORT NextAttributeNumber; 20 | } FILE_RECORD_HEADER, *PFILE_RECORD_HEADER; 21 | 22 | typedef enum { 23 | AttributeStandardInformation = 0x10, 24 | AttributeAttributeList = 0x20, 25 | AttributeFileName = 0x30, 26 | AttributeObjectId = 0x40, 27 | AttributeSecurityDescriptor = 0x50, 28 | AttributeVolumeName = 0x60, 29 | AttributeVolumeInformation = 0x70, 30 | AttributeData = 0x80, 31 | AttributeIndexRoot = 0x90, 32 | AttributeIndexAllocation = 0xA0, 33 | AttributeBitmap = 0xB0, 34 | AttributeReparsePoint = 0xC0, 35 | AttributeEAInformation = 0xD0, 36 | AttributeEA = 0xE0, 37 | AttributePropertySet = 0xF0, 38 | AttributeLoggedUtilityStream = 0x100 39 | } ATTRIBUTE_TYPE, *PATTRIBUTE_TYPE; 40 | 41 | typedef struct { 42 | ATTRIBUTE_TYPE AttributeType; 43 | ULONG Length; 44 | BOOLEAN Nonresident; 45 | UCHAR NameLength; 46 | USHORT NameOffset; 47 | USHORT Flags; 48 | USHORT AttributeNumber; 49 | } ATTRIBUTE, *PATTRIBUTE; 50 | 51 | typedef struct { 52 | ATTRIBUTE Attribute; 53 | ULONG ValueLength; 54 | USHORT ValueOffset; 55 | USHORT Flags; 56 | } RESIDENT_ATTRIBUTE, *PRESIDENT_ATTRIBUTE; 57 | 58 | typedef struct { 59 | ATTRIBUTE Attribute; 60 | ULONGLONG LowVcn; 61 | ULONGLONG HighVcn; 62 | USHORT RunArrayOffset; 63 | UCHAR CompressionUnit; 64 | UCHAR AlignmentOrReserved[5]; 65 | ULONGLONG AllocatedSize; 66 | ULONGLONG DataSize; 67 | ULONGLONG InitializedSize; 68 | ULONGLONG CompressedSize; 69 | } NONRESIDENT_ATTRIBUTE, *PNONRESIDENT_ATTRIBUTE; 70 | 71 | typedef struct { 72 | ULONGLONG CreationTime; 73 | ULONGLONG ChangeTime; 74 | ULONGLONG LastWriteTime; 75 | ULONGLONG LastAccessTime; 76 | ULONG FileAttributes; 77 | ULONG AlignmentOrReservedOrUnknown[3]; 78 | ULONG QuotaId; 79 | ULONG SecurityId; 80 | ULONGLONG QuotaCharge; 81 | USN Usn; 82 | } STANDARD_INFORMATION, *PSTANDARD_INFORMATION; 83 | 84 | typedef struct { 85 | ATTRIBUTE_TYPE AttributeType; 86 | USHORT Length; 87 | UCHAR NameLength; 88 | UCHAR NameOffset; 89 | ULONGLONG LowVcn; 90 | ULONGLONG FileReferenceNumber; 91 | USHORT AttributeNumber; 92 | USHORT AlignmentOrReserved[3]; 93 | } ATTRIBUTE_LIST, *PATTRIBUTE_LIST; 94 | 95 | typedef struct { 96 | ULONGLONG DirectoryFileReferenceNumber; 97 | ULONGLONG CreationTime; 98 | ULONGLONG ChangeTime; 99 | ULONGLONG LastWriteTime; 100 | ULONGLONG LastAccessTime; 101 | ULONGLONG AllocatedSize; 102 | ULONGLONG DataSize; 103 | ULONG FileAttributes; 104 | ULONG AlignmentOrReserved; 105 | UCHAR NameLength; 106 | UCHAR NameType; 107 | WCHAR Name[1]; 108 | } FILENAME_ATTRIBUTE, *PFILENAME_ATTRIBUTE; 109 | 110 | typedef struct { 111 | GUID ObjectId; 112 | union { 113 | struct { 114 | GUID BirthVolumeId; 115 | GUID BirthObjectId; 116 | GUID DomainId; 117 | }; 118 | UCHAR ExtendedInfo[48]; 119 | }; 120 | } OBJECTID_ATTRIBUTE, *POBJECTID_ATTRIBUTE; 121 | 122 | typedef struct { 123 | ULONG Unknown[2]; 124 | UCHAR MajorVersion; 125 | UCHAR MinorVersion; 126 | USHORT Flags; 127 | } VOLUME_INFORMATION, *PVOLUME_INFORMATION; 128 | 129 | typedef struct { 130 | ULONG EntriesOffset; 131 | ULONG IndexBlockLength; 132 | ULONG AllocatedSize; 133 | ULONG Flags; 134 | } DIRECTORY_INDEX, *PDIRECTORY_INDEX; 135 | 136 | typedef struct { 137 | ULONGLONG FileReferenceNumber; 138 | USHORT Length; 139 | USHORT AttributeLength; 140 | ULONG Flags; 141 | 142 | 143 | } DIRECTORY_ENTRY, *PDIRECTORY_ENTRY; 144 | 145 | typedef struct { 146 | ATTRIBUTE_TYPE Type; 147 | ULONG CollationRule; 148 | ULONG BytesPerIndexBlock; 149 | ULONG ClustersPerIndexBlock; 150 | DIRECTORY_INDEX DirectoryIndex; 151 | } INDEX_ROOT, *PINDEX_ROOT; 152 | 153 | typedef struct { 154 | NTFS_RECORD_HEADER Ntfs; 155 | ULONGLONG IndexBlockVcn; 156 | DIRECTORY_INDEX DirectoryIndex; 157 | } INDEX_BLOCK_HEADER, *PINDEX_BLOCK_HEADER; 158 | 159 | typedef struct { 160 | ULONG ReparseTag; 161 | USHORT ReparseDataLength; 162 | USHORT Reserved; 163 | UCHAR ReparseData[1]; 164 | } REPARSE_POINT, *PREPARSE_POINT; 165 | 166 | typedef struct { 167 | ULONG EaLength; 168 | ULONG EaQueryLength; 169 | } EA_INFORMATION, *PEA_INFORMATION; 170 | 171 | typedef struct { 172 | ULONG NextEntryOffset; 173 | UCHAR Flags; 174 | UCHAR EaNameLength; 175 | USHORT EaValueLength; 176 | CHAR EaName[1]; 177 | // UCHAR EaData[]; 178 | } EA_ATTRIBUTE, *PEA_ATTRIBUTE; 179 | 180 | typedef struct { 181 | WCHAR AttributeName[64]; 182 | ULONG AttributeNumber; 183 | ULONG Unknown[2]; 184 | ULONG Flags; 185 | ULONGLONG MinimumSize; 186 | ULONGLONG MaximumSize; 187 | } ATTRIBUTE_DEFINITION, *PATTRIBUTE_DEFINITION; 188 | 189 | #pragma pack(push, 1) 190 | 191 | typedef struct { 192 | UCHAR Jump[3]; 193 | UCHAR Format[8]; 194 | USHORT BytesPerSector; 195 | UCHAR SectorsPerCluster; 196 | USHORT BootSectors; 197 | UCHAR Mbz1; 198 | USHORT Mbz2; 199 | USHORT Reserved1; 200 | UCHAR MediaType; 201 | USHORT Mbz3; 202 | USHORT SectorsPerTrack; 203 | USHORT NumberOfHeads; 204 | ULONG PartitionOffset; 205 | ULONG Reserved2[2]; 206 | ULONGLONG TotalSectors; 207 | ULONGLONG MftStartLcn; 208 | ULONGLONG Mft2StartLcn; 209 | ULONG ClustersPerFileRecord; 210 | ULONG ClustersPerIndexBlock; 211 | LARGE_INTEGER VolumeSerialNumber; 212 | UCHAR Code[0x1AE]; 213 | USHORT BootSignature; 214 | 215 | } BOOT_BLOCK, *PBOOT_BLOCK; 216 | 217 | #pragma pack(pop) 218 | 219 | 220 | unsigned long long fileNo1 = 0; 221 | 222 | void gotoXY1(int x ,int y) 223 | { 224 | COORD newPosition = { x , y}; 225 | SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),newPosition); 226 | } -------------------------------------------------------------------------------- /DataRicoverySoft 1.0 GUI Src/DataRicoverySoft/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yang123vc/DataRecovery-1/3c82762305e5c8b87cdc7bba1fc7fc81a47a1653/DataRicoverySoft 1.0 GUI Src/DataRicoverySoft/resource.h -------------------------------------------------------------------------------- /DataRicoverySoft 1.0 GUI Src/DataRicoverySoft/resource1.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Resource.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /DataRicoverySoft Bin.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yang123vc/DataRecovery-1/3c82762305e5c8b87cdc7bba1fc7fc81a47a1653/DataRicoverySoft Bin.zip -------------------------------------------------------------------------------- /MyDataRicovery Bin .zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yang123vc/DataRecovery-1/3c82762305e5c8b87cdc7bba1fc7fc81a47a1653/MyDataRicovery Bin .zip -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DataRecovery 2 | Data Recovery Software is a Program that Recover all deleted And formatted File from your Storage Device Like- HDD, Floppy, Pen-drive……..etc. This software give a UI for recover a drive you need to select a drive and file type to recover, all deleted file will list in list box you can select one or more file and recover them. This software also provide a option of exporting of scanned file for recover next time without scanning. There are also available multiple user interface design and animated UI as you like . Data Recovery is a program that recover all delete , format , crash data from any drive such as HDD , Floppy , pen-drive , memory card ,…etc. This project has been planned to be find lost data. All user simple use this software. This software available only Windows OS. 3 | --------------------------------------------------------------------------------