mirror of
https://github.com/thomasxm/amber
synced 2026-06-08 17:46:04 +00:00
--ignore-mapping-size & --ignore-alignment parameters merged together to -ignore-integrity
This commit is contained in:
+1
-2
@@ -24,8 +24,7 @@ func main() {
|
||||
flag.BoolVar(&target.verbose, "v", false, "Verbose output mode")
|
||||
flag.BoolVar(&target.verbose, "verbose", false, "Verbose output mode")
|
||||
flag.BoolVar(&target.debug, "debug", false, "Do not clean created files")
|
||||
flag.BoolVar(&target.IgnoreMappingSize, "ignore-mapping-size", false, "Ignore mapping size mismatch errors")
|
||||
flag.BoolVar(&target.IgnoreSectionAlignment, "ignore-section-alignment", false, "Ignore broken section alignment errors")
|
||||
flag.BoolVar(&target.IgnoreIntegrity, "ignore-integrity", false, "Ignore integrity check errors.")
|
||||
flag.BoolVar(&target.help, "h", false, "Display this message")
|
||||
flag.BoolVar(&target.help, "H", false, "Display this message")
|
||||
flag.Parse()
|
||||
|
||||
+4
-4
@@ -103,8 +103,8 @@ func CreateFileMapping(file string) (bytes.Buffer) {
|
||||
// Perform integrity checks...
|
||||
verbose("\n[#] Performing integrity checks on file mapping...\n|", "Y")
|
||||
if int(opt.SizeOfImage) != Map.Len() {
|
||||
if !target.IgnoreMappingSize {
|
||||
err := errors.New("Integrity check failed (Mapping size does not match the size of image header)\nTry '--ignore-mapping-size' parameter.")
|
||||
if !target.IgnoreIntegrity {
|
||||
err := errors.New("Integrity check failed (Mapping size does not match the size of image header)\nTry '-ignore-integrity' parameter.")
|
||||
ParseError(err,"Integrity check failed (Mapping size does not match the size of image header)")
|
||||
}
|
||||
}
|
||||
@@ -114,8 +114,8 @@ func CreateFileMapping(file string) (bytes.Buffer) {
|
||||
for j := 0; j < int(File.Sections[i].Size/10); j++ {
|
||||
Buffer := Map.Bytes()
|
||||
if RawFile[int(int(File.Sections[i].Offset)+j)] != Buffer[int(int(File.Sections[i].VirtualAddress)+j)] {
|
||||
if !target.IgnoreSectionAlignment {
|
||||
err := errors.New("Integrity check failed (Broken section alignment)\nTry '--ignore-section-alignment' parameter.")
|
||||
if !target.IgnoreIntegrity {
|
||||
err := errors.New("Integrity check failed (Broken section alignment)\nTry '-ignore-integrity' parameter.")
|
||||
ParseError(err,"Integrity check failed (Broken section alignment)")
|
||||
}
|
||||
}
|
||||
|
||||
+2
-4
@@ -23,8 +23,7 @@ type PEID struct {
|
||||
help bool
|
||||
clean bool
|
||||
|
||||
IgnoreMappingSize bool
|
||||
IgnoreSectionAlignment bool
|
||||
IgnoreIntegrity bool
|
||||
|
||||
//Analysis...
|
||||
FileSize string
|
||||
@@ -123,8 +122,7 @@ OPTIONS:
|
||||
-i, -iat Uses import address table entries instead of export address table
|
||||
-s, -scrape Scrape the PE header info (May break some files)
|
||||
-no-resource Don't add any resource data
|
||||
-ignore-mapping-size Ignore mapping size mismatch errors
|
||||
-ignore-section-alignment Ignore broken section alignment errors
|
||||
-ignore-integrity Ignore integrity check errors.
|
||||
-v, -verbose Verbose output mode
|
||||
-h, -H Show this massage
|
||||
EXAMPLE:
|
||||
|
||||
Reference in New Issue
Block a user