Skip to content

Commit

Permalink
Download the dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
apehex committed Aug 21, 2023
1 parent 088c141 commit 80558d5
Show file tree
Hide file tree
Showing 6 changed files with 230,556 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@

# bibliography
*.bbl

# api keys
.env.json

# python env
pyproject.toml
230,523 changes: 230,523 additions & 0 deletions samples/all.csv

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions samples/dataset.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import csv
import json
import web3

# RPCs ########################################################################

with open('.env.json', 'r') as _f:
_ENV = json.load(_f)

PROVIDERS = {
int(_k): {
'rpc': web3.Web3(Web3.HTTPProvider(_v['rpc'])),
'api': _v.get('api', '')}
for _k, _v in _ENV.items() if _v.get('rpc', '')}

# DOWNLOAD ####################################################################

with open('all.csv', 'r') as _f:
_r = csv.reader(_f, delimiter=',')
for _l in _r:
int(_l[0]) in PROVIDERS

# web3.eth.get_code('0x6C8f2A135f6ed072DE4503Bd7C4999a1a17F824B')
3 changes: 2 additions & 1 deletion samples/morphing/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Morphing Techniques

Morphing contracts change their behavior depending on the context, especially when they're under scrutiny.
Morphing contracts change their behavior depending on the context.
In particular they replicate benign functionalities when they're under scrutiny.
2 changes: 1 addition & 1 deletion samples/obfuscation/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Obfuscation Techniques

Make the malicious portions of the code hard to find / understand.
Obfuscation is the process of making (malicious) code hard to find and understand.
2 changes: 1 addition & 1 deletion samples/spoofing/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Faking Techniques

Disguise malicious code as well-known or vulnerable code (honeypots) to bait users.
Spoofing is the art of disguising malicious code as well-known or vulnerable code (honeypots) to bait users.

0 comments on commit 80558d5

Please sign in to comment.