from pandas import read_csv
from sklearn.ensemble import RandomForestClassifier
import joblib
import sys

pythonPath = sys.argv[1]

df = read_csv(pythonPath + '/dataset.csv')
X = df.iloc[1:, 1: 22]
names = df.iloc[1:, 22]

print(X)
print(names)
loaded_rf = joblib.load(pythonPath + "/model.joblib")

predicts = loaded_rf.predict(X)
benigns = []
malware = [] 
i = 1
for predict in predicts:
    if predict == 'no':
        benigns.append(names[i])
    else:
        malware.append(names[i])
    i+=1
    
print("benigns: " ,benigns)
print("malware: " ,malware)
