Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add pick-before-use attack example #22

Merged
merged 6 commits into from
Apr 22, 2022
Merged

add pick-before-use attack example #22

merged 6 commits into from
Apr 22, 2022

Conversation

dusmart
Copy link
Contributor

@dusmart dusmart commented Apr 21, 2022

No description provided.

{
public static void OnNEP17Payment(UInt160 from, BigInteger amount, object data)
{
if (Runtime.CallingScriptHash == NEO.Hash && amount == 1)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EntryScritptHash is the hash of the transaction script, then, we might need to manually verify the format of the script. Check the first few bytes mabye?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I think gleeder's check is better. It checks every bit in the tx's script.

@vang1ong7ang vang1ong7ang merged commit 2992d8b into lazynode:main Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants