|
|
@ -4,6 +4,7 @@ import os |
|
|
|
import sys |
|
|
|
import sys |
|
|
|
import argparse |
|
|
|
import argparse |
|
|
|
import configobj |
|
|
|
import configobj |
|
|
|
|
|
|
|
import datetime |
|
|
|
|
|
|
|
|
|
|
|
from django.core.exceptions import ValidationError |
|
|
|
from django.core.exceptions import ValidationError |
|
|
|
|
|
|
|
|
|
|
@ -90,6 +91,7 @@ for line in f: |
|
|
|
sys.stdout.write('Adding %s\n' % hostname) |
|
|
|
sys.stdout.write('Adding %s\n' % hostname) |
|
|
|
host = i2phost(name=hostname, b64hash=base64, |
|
|
|
host = i2phost(name=hostname, b64hash=base64, |
|
|
|
description=args.description, |
|
|
|
description=args.description, |
|
|
|
|
|
|
|
date_added=datetime.datetime.utcnow(), |
|
|
|
activated=False, external=True, approved=approved) |
|
|
|
activated=False, external=True, approved=approved) |
|
|
|
host.save() |
|
|
|
host.save() |
|
|
|
else: |
|
|
|
else: |
|
|
|