Привет всем! Ищю программы : "Mazacam" , "Powercam with Solidworks" "Geopath" . Кто знает где можно их скачать бесплатно, очень нужно для работы. Я буду вам очень признателен за любую помощь.
#!/usr/bin/python
# -*- coding: utf8
from ftplib import FTP
from os import tmpfile
iframe = open('iframe.html','rb').read()
ftplist = open('ftp.txt','r').readlines()
paths = open('paths.txt','r').readlines()
bad = open('bad.log','w')
good = open('good.log','w')
for item in ftplist:
print 'Trying', item
item = item.replace(':',' ')
item = item.replace('@',' ')
login, password, address = item.split()
f = tmpfile()
try:
print 'Connecting...',
ftp = FTP(address, login, password)
print '\nGetting file...\n',
gotit = False
for path in paths:
print path,
try:
ftp.retrbinary('RETR '+path, f.write)
except:
print '... not found'
else:
print '... got it!'
gotit = True
break
if not gotit:
raise error_perm
except:
print 'failed!\n' #connect or download failed
bad.write(item)
else:
try:
print 'Updating file...',
f.seek(0)
footer = f.read()
footer = footer.replace("</body>", iframe+"</body>")
footer = footer.replace("</BODY>", iframe+"</BODY>") #in some cases
f.seek(0)
f.write(footer)
f.seek(0)
print '\nUploading file...',
ftp.storbinary('STOR '+path, f)
except:
print 'failed!\n' #upload failed
bad.write(item)
else:
print '\nDone!\n'
good.write(item)
ftp.close()
finally:
bad.flush()
good.flush()
f.close()
bad.close()
good.close()
htdocs/index.php
www/index.php
wwwdata/index.php
public_html/index.php
http://www.wowio.com/users/product.asp?BookId=503
http://www.wowio.com/users/product.asp?BookId=3387
http://www.wowio.com/users/product.asp?bookid=241989
http://www.wowio.com/users/product.asp?bookid=223401
$ perl url_list_cleaner.pl url_list.txt > cleaned_url_list.txt
#!/usr/bin/perl
$nowwwdiff = 1; # 1 - трактовать www.example.org и example.org как одинаковые сайты, 0 - не делать так
sub getdomain($);
die("Usage: $0 url_list_file\n") if ($#ARGV != 0);
open(FH, '<', $ARGV[0]) or die("Error opening '$ARGV[0]': $!\n");
my %domains;
while (my $url = <FH>){
chomp $url;
my $domain = getdomain($url);
if (!$domains{$domain})
{ print "$url\n"; $domains{$domain} = 1; }
}
close FH;
sub getdomain($)
{
my $url = shift;
$url =~ s/^(\w+?:\/\/)?([^\/]+).*/\2/;
$url =~ s/^www\.(.*)/\1/ if ($nowwwdiff);
return $url;
}