-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2756974
commit 599078e
Showing
14 changed files
with
611 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
__pycache__/ | ||
*.pyc | ||
*.pyo | ||
*.pyd | ||
.Python | ||
env/ | ||
.temp | ||
cache | ||
.git | ||
Dockerfile | ||
output | ||
.vscode | ||
target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
gigahorse-toolchain/* linguist-vendored |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
/target | ||
.vscode | ||
.vscode | ||
|
||
output/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
FROM ubuntu:22.04 | ||
|
||
USER root | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install some essentials | ||
RUN apt-get update && apt-get upgrade -y && apt-get install -y \ | ||
build-essential \ | ||
libboost-all-dev \ | ||
wget | ||
|
||
# Install python3 | ||
RUN apt-get install python3-dev python3-pip -y | ||
|
||
# Install souffle | ||
RUN wget https://souffle-lang.github.io/ppa/souffle-key.public -O /usr/share/keyrings/souffle-archive-keyring.gpg | ||
RUN echo "deb [signed-by=/usr/share/keyrings/souffle-archive-keyring.gpg] https://souffle-lang.github.io/ppa/ubuntu/ stable main" | tee /etc/apt/sources.list.d/souffle.list | ||
RUN apt-get update && apt-get install souffle -y | ||
|
||
# Dependencies for Gigahorse output viz | ||
RUN apt-get update && apt-get install -y graphviz | ||
RUN apt-get update && apt-get install -y libssl-dev | ||
|
||
RUN python3 -m pip install --upgrade pip | ||
RUN python3 -m pip install pydot | ||
|
||
# Install Rust and Cargo using rustup | ||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
|
||
# Set the environment path to include Cargo binaries | ||
ENV PATH="/root/.cargo/bin:${PATH}" | ||
|
||
# Set up a non-root 'lydia' user | ||
RUN groupadd -r lydia && useradd -ms /bin/bash -g lydia lydia | ||
|
||
RUN mkdir -p /opt/lydia | ||
|
||
# Copy gigahorse project root | ||
COPY . /opt/lydia/ | ||
|
||
RUN chown -R lydia:lydia /opt/lydia | ||
RUN chmod -R o+rwx /opt/lydia | ||
|
||
# Switch to new 'gigahorse' user context | ||
USER lydia | ||
|
||
# Souffle-addon bare-minimum make | ||
RUN cd /opt/lydia/gigahorse-toolchain/souffle-addon && make libsoufflenum.so | ||
# RUN cd /opt/lydia && pip3 install -r requirements.txt | ||
|
||
WORKDIR /opt/lydia | ||
|
||
# RUN cargo build --release | ||
|
||
CMD ["-h"] | ||
ENTRYPOINT ["cargo", "run"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
# Lydia | ||
|
||
![Static Badge](https://img.shields.io/badge/license-apache-blue) | ||
![Static Badge](https://img.shields.io/badge/language-rust-red) | ||
|
||
An Attacker Contract Identification Tool Implemented in Rust based on BlockWatchdog. | ||
|
||
RUST_LOG=info cargo run -- ETH 0x10C509AA9ab291C76c45414e7CdBd375e1D5AcE8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.