This commit is contained in:
Ajin Abraham
2016-11-30 18:16:19 +05:30
parent e10871aec2
commit c29b7c1319
9 changed files with 115 additions and 10 deletions
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10b1 on 2016-11-30 12:07
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('APITester', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='scopeurlsandtests',
name='MD5',
field=models.CharField(max_length=32),
),
]
+1 -1
View File
@@ -2,6 +2,6 @@ from django.db import models
# Create your models here.
class ScopeURLSandTests(models.Model):
MD5=models.CharField(max_length=30)
MD5=models.CharField(max_length=32)
SCOPEURLS=models.TextField()
SCOPETESTS=models.TextField()
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10b1 on 2016-11-30 12:07
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('MobSF', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='recentscansdb',
name='MD5',
field=models.CharField(max_length=32),
),
]
+1 -1
View File
@@ -3,6 +3,6 @@ from django.db import models
class RecentScansDB(models.Model):
NAME = models.TextField()
MD5 = models.CharField(max_length=50)
MD5 = models.CharField(max_length=32)
URL = models.TextField()
TS = models.DateTimeField()
+15 -1
View File
@@ -22,7 +22,7 @@ import install.windows.setup as windows_setup
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
#==============================================
MOBSF_VER = "v0.9.3.3 Beta"
MOBSF_VER = "v0.9.3.4 Beta"
BANNER = """
__ __ _ ____ _____ ___ ___ _____
| \/ | ___ | |__/ ___|| ___|_ __/ _ \ / _ \ |___ /
@@ -55,12 +55,26 @@ DB_DIR = os.path.join(MobSF_HOME, 'db.sqlite3')
# Database
# https://docs.djangoproject.com/en/dev/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': DB_DIR,
}
}
#Postgres DB - Install psycopg2
'''
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'mobsf',
'USER': 'postgres',
'PASSWORD': '',
'HOST': 'localhost',
'PORT': '',
}
}
'''
#===============================================
#==========LOAD CONFIG FROM MobSF HOME==========
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10b1 on 2016-11-30 11:54
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('StaticAnalyzer', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='staticanalyzerandroid',
name='MD5',
field=models.CharField(max_length=32),
),
]
@@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10b1 on 2016-11-30 12:07
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('StaticAnalyzer', '0002_auto_20161130_1154'),
]
operations = [
migrations.AlterField(
model_name='staticanalyzerioszip',
name='MD5',
field=models.CharField(max_length=32),
),
migrations.AlterField(
model_name='staticanalyzeripa',
name='MD5',
field=models.CharField(max_length=32),
),
migrations.AlterField(
model_name='staticanalyzerwindows',
name='MD5',
field=models.CharField(max_length=32),
),
]
+5 -5
View File
@@ -6,7 +6,7 @@ class StaticAnalyzerAndroid(models.Model):
TITLE = models.TextField()
APP_NAME = models.TextField()
SIZE = models.CharField(max_length=50)
MD5 = models.CharField(max_length=30)
MD5 = models.CharField(max_length=32)
SHA1 = models.TextField()
SHA256 = models.TextField()
PACKAGENAME = models.TextField()
@@ -55,7 +55,7 @@ class StaticAnalyzerIPA(models.Model):
TITLE = models.TextField()
APPNAMEX = models.TextField()
SIZE = models.CharField(max_length=50)
MD5 = models.CharField(max_length=50)
MD5 = models.CharField(max_length=32)
SHA1 = models.TextField()
SHA256 = models.TextField()
INFOPLIST = models.TextField()
@@ -76,7 +76,7 @@ class StaticAnalyzerIOSZIP(models.Model):
TITLE = models.TextField()
APPNAMEX = models.TextField()
SIZE = models.CharField(max_length=50)
MD5 = models.CharField(max_length=50)
MD5 = models.CharField(max_length=32)
SHA1 = models.TextField()
SHA256 = models.TextField()
INFOPLIST = models.TextField()
@@ -100,8 +100,8 @@ class StaticAnalyzerWindows(models.Model):
TITLE = models.TextField()
APP_NAME = models.TextField()
PUB_NAME = models.TextField()
SIZE = models.CharField(max_length = 50)
MD5 = models.CharField(max_length = 50)
SIZE = models.CharField(max_length=50)
MD5 = models.CharField(max_length=32)
SHA1 = models.TextField()
SHA256 = models.TextField()
BINNAME = models.TextField()
+3 -2
View File
@@ -81,8 +81,9 @@ def Unzip(APP_PATH, EXT_PATH):
except OSError as exc: # Guard against race condition
if exc.errno != errno.EEXIST:
print "\n[WARN] OS Error: Race Condition"
with io.open(outfile, mode='wb') as f:
f.write(dat.read())
if not outfile.endswith("/"):
with io.open(outfile, mode='wb') as f:
f.write(dat.read())
dat.close()
return files
except: