Research Article
EtherFuzz: Mutation Fuzzing Smart Contracts for TOD Vulnerability Detection
Algorithm 2
TOD vulnerability mutation fuzzing algorithm.
Input: Seeds:the existing test data | P:deployed smart contract under test | Output:result:detect result | 1 foreach seed Seeds do | 2 foeach p P do | 3 newseed=Mutation(seed); | 4 (trace_cov,ether,result)=Execute(P,newseed); | 5 end | 5 if testResult==hasTod then | 6 result=“TOD vulnerability found”; | 7 end | 8 if hasNewCov(trace_cov,virgin_cov) then | 9 Seeds=Seeds {newseed}; | 10 update(vrigin_cov,trace_cov); | 11 end | 12 end |
|