#!/usr/bin/python
# make 'htpass' from 'passwd'
import re
import os
f = open('passwd','r').readlines()
first = 1
for line in f:
m = re.match('(.*)=(.*)\n', line)
if m != None:
print m.group(1), m.group(2)
if first == 1:
os.system('htpasswd -c -b htpass %s %s' % (m.group(1), m.group(2)))
else:
os.system('htpasswd -b htpass %s %s' % (m.group(1), m.group(2)))
first = 0
0 件のコメント:
コメントを投稿