Показать сообщение отдельно

DirsSearcher
  #8  
Старый 21.03.2009, 15:12
faza02
Banned
Регистрация: 21.11.2007
Сообщений: 181
С нами: 9721141

Репутация: 1013
По умолчанию DirsSearcher

Код:
#!/usr/bin/python
#header  dirs scan
#http://sql.parsers.info/
#faza02[at]gmail[dot]com

import urllib

def  scan():
	print '     ____________________________  '
	print '    /                           /\ '
	print '   /                          _/ /\ '
	print '  /         by faza02         / \/ '
	print ' /                           /\   '
	print '/___________________________/ / '
	print '\___________________________\/ '
	print ' \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ '

	good = [100, 101, 200, 201,202, 203,204,205, 206, 300, 301, 302, 303, 304, 305]

	site = raw_input(u'\nsite: ')
	dirlist = raw_input(u'dirs: ')

	fileopen = open(dirlist, 'a+').readlines()
	for i in range(len(fileopen)):
	 	state = urllib.urlopen('http://' + site + fileopen[i][:-1]).getcode()
	 	if state in good:
	 	 print fileopen[i][:-1] + ' - ' + str(state)
	 	open('c:/' + site + '_log.txt', 'a+').write(fileopen[i][:-1] + ' - ' + str(state) + '\n')

scan()
print '\nok!'
сканер директорий, доволбно быстрый.
все логи хранит в c:/[site]_log.txt
http://sql.parsers.info/list.txt - неплохой словарь.
 
Ответить с цитированием