Skip to content

Commit

Permalink
Upgrading to 0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheksa committed Dec 13, 2014
1 parent 0a34194 commit 0e96c3c
Show file tree
Hide file tree
Showing 32 changed files with 408 additions and 456 deletions.
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Since version 0.42 theZoo have been going dramatic changes. It now runs in both
The current default state of theZoo runtime is the CLI which is inspired by MSF. The following files and directories are responsible for the application's behaviour.

### /conf
The conf folder holds files relevant to the particular running of the program but are not part of the application. You can find the EULA file in the conf, the current database version, the CSV index file and more.
The conf folder holds files relevant to the particular running of the program but are not part of the application. You can find the EULA file in the conf and more.
### /imports
Contains .py and .pyc import files used by the rest of the application
### /malwares
Expand All @@ -52,17 +52,17 @@ Since mdbv0.2 is stable for the command line arguments (where as of 0.42 we are


## Directory Structure:
Each directory is composed of 5 files:
Each directory is composed of 4 files:
- Malware files in an encrypted ZIP archive.
- SHA256 sum of the 1st file.
- MD5 sum of the 1st file.
- Password file for the archive.
- index.log file for the indexer.


## Structure of index.csv
The main index.csv is the DB which you will look in to find malwares indexed on your drive. We use the , charachter as the delimiter to our CSVs.
The structure is al follows:

## Structure of maldb.db
maldb.db is the DB which theZoo is acting upon to find malwares indexed on your drive.
The structure is as follows:

uid,location,type,name,version,author,language,date

Expand All @@ -87,13 +87,19 @@ Bugs and Reports
The repository holding all files is currently
https://github.com/ytisf/theZoo

##Change Log for v0.50:
## Change Log for v0.60:
- [x] Moved DB to SQLite3.
- [x] Searching overhaul to a freestyle fashion.
- [x] Fixed "get" command.
- [x] More & more malwares.

## Change Log for v0.50:
- [x] Better and easier UI.
- [x] Aligned printing of malwares.
- [x] Command line arguments are now working.
- [x] Added 10 more malwares (cool ones) to the DB.

##Change Log for v0.42:
## Change Log for v0.42:
- [x] Fix EULA for proper disclaimer.
- [x] More precise searching and indexing including platform and more.
- [x] Added 10 new malwares.
Expand All @@ -113,7 +119,7 @@ The repository holding all files is currently
- [X] More documentation has been added.
- [X] Removed debugging function which were dead in the code.

##Predicted Change Log for v1.0
## Predicted Change Log for v1.0
- [ ] Fix auto-complete for malware frameworks.
- [ ] Better UI features.
- [ ] Consider changing DB to XML or SQLite3.
Expand Down
69 changes: 0 additions & 69 deletions conf/index.csv

This file was deleted.

Binary file added conf/maldb.db
Binary file not shown.
32 changes: 32 additions & 0 deletions imports/db_handler.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import sqlite3 as lite
from imports import globals
import sys


class DBHandler:

def __init__(self):
try:
self.con = lite.connect(globals.vars.db_path)
self.cur = self.con.cursor()
except lite.Error as e:
print "An error occurred:", e.args[0]
sys.exit()

def get_full_details(self):
return self.cur.execute("SELECT * FROM Malwares").fetchall()

def get_partial_details(self):
return self.cur.execute("SELECT ID, TYPE, LANGUAGE, ARCHITECTURE, PLATFORM, NAME FROM Malwares").fetchall()

def get_mal_names(self):
# Sqlite3 returns a tuple even if a single value is returned
# We use x[0] for x to unpack the tuples
return [val[0] for val in self.cur.execute("SELECT NAME FROM Malwares").fetchall()]

def query(self, query, param=''):
try:
return self.cur.execute(query, param).fetchall()
except lite.Error as e:
print "An error occurred:", e.args[0]
sys.exit()
36 changes: 19 additions & 17 deletions imports/eula_handler.py
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
#!/usr/bin/env python

#Malware DB - the most awesome free malware database on the air
#Copyright (C) 2014, Yuval Nativ, Lahad Ludar, 5Fingers
# Malware DB - the most awesome free malware database on the air
# Copyright (C) 2014, Yuval Nativ, Lahad Ludar, 5Fingers

#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.

#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

#You should have received a copy of the GNU General Public License
#along with this program. If not, see <http://www.gnu.org/licenses/>.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import sys
import os
from imports import globals


class EULA:

def __init__(self, langs = None, oneRun=True):
def __init__(self, langs=None, oneRun=True):
#self.oneRun = oneRun
self.check_eula_file()
#self.prompt_eula()
# self.prompt_eula()

def check_eula_file(self):
try:
Expand All @@ -36,13 +37,13 @@ def check_eula_file(self):

def prompt_eula(self):
globals.init()
#os.system('clear')
os.system('cls' if os.name == 'nt' else 'clear')
print globals.bcolors.RED
print '_____________________________________________________________________________'
print '| ATTENTION!!! ATTENTION!!! ATTENTION!!! |'
print '| ' + globals.vars.appname + ' v' + globals.vars.version + ' |'
print '|___________________________________________________________________________|'
print '|This program contain live and dangerous malware files |'
print '|This program contains live and dangerous malware files |'
print '|This program is intended to be used only for malware analysis and research |'
print '|and by agreeing the EULA you agree to only use it for legal purposes and |'
print '|studying malware. |'
Expand All @@ -51,10 +52,11 @@ def prompt_eula(self):
print '|infect you machines will live and dangerous malwares!. |'
print '|___________________________________________________________________________|'
print globals.bcolors.WHITE
eula_answer = raw_input('Type YES in captial letters to accept this EULA.\n > ')
eula_answer = raw_input(
'Type YES in captial letters to accept this EULA.\n > ')
if eula_answer == 'YES':
new = open(globals.vars.eula_file, 'a')
new.write(eula_answer)
else:
print 'You need to accept the EULA.\nExiting the program.'
sys.exit(0)
sys.exit(0)
Loading

2 comments on commit 0e96c3c

@ytisf
Copy link
Owner

@ytisf ytisf commented on 0e96c3c Dec 14, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful!

@bararchy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow, nice work !

Please sign in to comment.