| View previous topic :: View next topic |
| Author |
Message |
skynet888 !BEWARE! Deletes post on answer
Reputation: 1
Joined: 12 Apr 2021 Posts: 97
|
Posted: Thu Oct 01, 2026 5:27 am Post subject: Is there an opposite built-in function for 'assert()' |
|
|
assertnot(Address, ArrayOfBytes)
Will check the memory address for the given bytes. If the address's memory is not what is defined by the array of bytes given, the auto assemble script will execute.
|
|
| Back to top |
|
 |
Csimbi I post too much
Reputation: 99
Joined: 14 Jul 2007 Posts: 3432
|
Posted: Thu Oct 01, 2026 11:30 am Post subject: |
|
|
Why bother then? The AA script would execute whether the bytes are good or bad.
Technically, what you wrote is not the opposite though.
The opposite would be:
| Quote: | | If the address's memory is what is defined by the array of bytes given, the auto assemble script will execute. |
Not that it matters because the result is the same - script executes either way.
|
|
| Back to top |
|
 |
skynet888 !BEWARE! Deletes post on answer
Reputation: 1
Joined: 12 Apr 2021 Posts: 97
|
Posted: Thu Oct 01, 2026 5:44 pm Post subject: |
|
|
| Csimbi wrote: | Why bother then? The AA script would execute whether the bytes are good or bad.
Technically, what you wrote is not the opposite though.
The opposite would be:
| Quote: | | If the address's memory is what is defined by the array of bytes given, the auto assemble script will execute. |
Not that it matters because the result is the same - script executes either way. |
assertnot(Address, FF)
assertnot(Address, ArrayOfBytes)
Will check the memory address for the given bytes. If the address's memory is what is defined by the array of bytes given, the auto assemble script will not execute.
[ENABLE]
assert(address, FF)
[DISABLE]
assertnot(address, FF)
|
|
| Back to top |
|
 |
Csimbi I post too much
Reputation: 99
Joined: 14 Jul 2007 Posts: 3432
|
Posted: Fri Oct 02, 2026 2:42 pm Post subject: |
|
|
| Ah, I see. That makes sense. How'd you restore the wrong bytes though?
|
|
| Back to top |
|
 |
skynet888 !BEWARE! Deletes post on answer
Reputation: 1
Joined: 12 Apr 2021 Posts: 97
|
Posted: Fri Oct 02, 2026 10:34 pm Post subject: |
|
|
| Csimbi wrote: | | Ah, I see. That makes sense. How'd you restore the wrong bytes though? |
The "address" in the sample code above does not necessarily refer to the injected address. It may also be the address of a toggle variable or a user-defined state variable. Even if `address` does represent the injected address, `assertnot()` still has value: it improves the robustness of the script, as shown below:
[ENABLE]
assert(address, 8B FF 55 8B EC)
[DISABLE]
assertnot(address, 8B FF 55 8B EC)
|
|
| Back to top |
|
 |
|