agencies

DeepDFA(초안) 본문

Ⅲ. 정보보안

DeepDFA(초안)

agencies 2024. 10. 12. 17:06

환경은 역시 Colab에서 진행됩니다.

* 용량이 큰 10GB 짜리 MSR.... 엑셀 파일은 google drive업로드 후

cp 명령어로 복사합니다 > 경로는 스토리지 > 익스터널 > ....

!unzip joern-cli.zip -d joern-cli
!export PATH=$PATH:/content/joern-cli/joern-cli

from google.colab import drive
drive.mount('/content/drive')

!pip install pip==23.2.1
!pip install tqdm numpy pandas torch==1.12 "torchmetrics<0.10.0" torchsampler silence-tensorflow tensorflow scipy captum deepspeed scikit-learn tokenizers transformers tree-sitter unidiff jsonlines networkx pexpect jsonargparse fastparquet gdown nni
!pip install -f https://data.dgl.ai/wheels/cu117/repo.html "dgl<1.1.3"
!pip install pytorch-lightning==1.7.7
!apt-get install openjdk-11-jdk-headless -qq > /dev/null
!pip install virtualenv

 

# bash scripts/run_prepare.sh $@

!python -u DeepDFA/DDFA/sastvd/scripts/prepare.py --dataset bigvul --global_workers 12

 

# bash scripts/run_getgraphs.sh $@ # Make sure Joern is installed!

import os
os.environ['PATH'] += ":/content/joern-cli/joern-cli"

#run getgraphes...
!python -u DeepDFA/DDFA/sastvd/scripts/getgraphs.py bigvul --sess $jan --num_jobs 100 --overwrite