[metagoofil/el6/master] Update for version 1.4b
rebus
rebus at fedoraproject.org
Sun Aug 15 20:11:29 UTC 2010
commit 4bcb2ad067f008018d5d5bcb47f9fa237bc54efd
Author: Michal Ambroz <rebus at seznam.cz>
Date: Sun Aug 15 22:11:17 2010 +0200
Update for version 1.4b
.gitignore | 1 +
metagoofil-howmany.patch | 23 +++++++
metagoofil-path.patch | 20 ++----
metagoofil-str.patch | 157 ++++++++++++++++++++++++++++++++++++++++++++++
metagoofil.spec | 18 +++++-
sources | 2 +-
6 files changed, 204 insertions(+), 17 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 90981d5..3590119 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
metagoofil-1.4a.tar
+metagoofil-1.4b.tar
diff --git a/metagoofil-howmany.patch b/metagoofil-howmany.patch
new file mode 100644
index 0000000..8f9fe01
--- /dev/null
+++ b/metagoofil-howmany.patch
@@ -0,0 +1,23 @@
+diff -ru metagoofil/metagoofil.py metagoofil.new/metagoofil.py
+--- metagoofil/metagoofil.py 2010-08-15 21:07:15.000000000 +0200
++++ metagoofil.new/metagoofil.py 2010-08-15 20:50:20.000000000 +0200
+@@ -153,14 +153,17 @@
+ h.endheaders()
+ returncode, returnmsg, headers = h.getreply()
+ data=h.getfile().read()
+- r1 = re.compile('About [0123456789,]* results')
++ #r1 = re.compile('About *[0123456789,]* results')
++ r1 = re.compile('resultStats>[a-zA-Z ]*[0123456789,]* results')
+ result = r1.findall(data)
+ if result ==[]:
+- r1 = re.compile('About [0123456789,]* results')
++ #r1 = re.compile('About [0123456789,]* results')
++ r1 = re.compile('resultStats>[a-zA-Z ]*[0123456789,]* results')
+ result = r1.findall(data)
+ for x in result:
+ clean = re.sub(' <b>','',x)
+ clean = re.sub('</b> ','',clean)
++ clean = re.sub('resultStats>','',clean)
+ clean = re.sub('About','',clean)
+ clean = re.sub('results','',clean)
+ clean = re.sub(',','',clean)
diff --git a/metagoofil-path.patch b/metagoofil-path.patch
index 63b5c42..155f21e 100644
--- a/metagoofil-path.patch
+++ b/metagoofil-path.patch
@@ -1,23 +1,17 @@
-diff -ru metagoofil-1.4a/metagoofil.py metagoofil-1.4a.fc12/metagoofil.py
---- metagoofil-1.4a/metagoofil.py 2008-09-15 23:47:03.000000000 +0200
-+++ metagoofil-1.4a.fc12/metagoofil.py 2010-01-15 01:44:42.000000000 +0100
-@@ -1,4 +1,4 @@
--
+--- metagoofil/metagoofil.py.path 2010-05-12 01:39:24.000000000 +0200
++++ metagoofil/metagoofil.py 2010-08-15 13:31:37.000000000 +0200
+@@ -1,3 +1,4 @@
+#!/usr/bin/python
#Covered by GPL V2.0
import time
import string
-@@ -24,10 +24,12 @@
- #Win
- ##extcommand='c:\extractor\\bin\extract.exe -l libextractor_ole2'
- #OSX
--extcommand='/opt/local/bin/extract'
-+#extcommand='/opt/local/bin/extract'
+@@ -25,7 +26,8 @@
+ #extcommand='/opt/local/bin/extract'
#Cygwin
#extcommand='/cygdrive/c/extractor/bin/extract.exe'
- #extcommand='/usr/bin/extract'
+-extcommand='/usr/bin/extract'
++#extcommand='/usr/bin/extract'
+extcommand='/usr/bin/libextractor-extract'
-+
result =[]
global dir
diff --git a/metagoofil-str.patch b/metagoofil-str.patch
new file mode 100644
index 0000000..625dbda
--- /dev/null
+++ b/metagoofil-str.patch
@@ -0,0 +1,157 @@
+diff -ru metagoofil/metagoofil.py metagoofil.new/metagoofil.py
+--- metagoofil/metagoofil.py 2010-08-15 20:38:09.000000000 +0200
++++ metagoofil.new/metagoofil.py 2010-08-15 20:23:17.000000000 +0200
+@@ -48,7 +48,7 @@
+
+ #Mac address extractor#
+ def get_mac(file,dir):
+- filename=dir+"/"+file
++ filename=str(dir)+"/"+str(file)
+ line=open(filename,'r')
+ res=""
+ for l in line:
+@@ -66,7 +66,7 @@
+
+ def get_pdf_meta(file,dir):
+ from pyPdf import PdfFileReader
+- filename=dir+"/"+file
++ filename=str(dir)+"/"+str(file)
+ a=''
+ try:
+ input1 = pyPdf.PdfFileReader(file(filename, "rb"))
+@@ -76,12 +76,12 @@
+ return a,a
+
+ def get_info_pdf(file,dir):
+- filename=dir+"/"+file
++ filename=str(dir)+"/"+str(file)
+ line=open(filename,'r')
+ res=""
+ for l in line:
+ res+=l
+- arex=re.compile('xap:Author=.* ')
++ arex=re.compile('xap:Author=.* ')
+ getter=arex.findall(res)
+ if getter==[]:
+ aut3=''
+@@ -92,7 +92,7 @@
+ aut3=aut3.replace("'","")
+ pat=""
+ return aut3,pat
+- rex=re.compile('xmpmeta')
++ rex=re.compile('xmpmeta')
+ getter=rex.findall(res)
+ if getter==[]:
+ meta=''
+@@ -147,7 +147,7 @@
+
+ def howmany(w):
+ h = httplib.HTTP('www.google.com')
+- h.putrequest('GET',"/search?num=100&start=0+hl=en&btnG=B%C3%BAsqueda+en+Google&meta=&q=site%3A"+w+"+filetype%3A"+file)
++ h.putrequest('GET',"/search?num=100&start=0+hl=en&btnG=B%C3%BAsqueda+en+Google&meta=&q=site%3A"+str(w)+"+filetype%3A"+str(file))
+ h.putheader('Host', 'www.google.com')
+ h.putheader('User-agent', 'Internet Explorer 6.0 ')
+ h.endheaders()
+@@ -176,7 +176,7 @@
+ def run(w,i):
+ res = []
+ h = httplib.HTTP('www.google.com')
+- h.putrequest('GET',"/search?num=20&start="+str(i)+"&hl=en&btnG=B%C3%BAsqueda+en+Google&meta=&q=site%3A"+w+"+filetype%3A"+file)
++ h.putrequest('GET',"/search?num=20&start="+str(i)+"&hl=en&btnG=B%C3%BAsqueda+en+Google&meta=&q=site%3A"+str(w)+"+filetype%3A"+str(file))
+ h.putheader('Host', 'www.google.com')
+ h.putheader('User-Agent','Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6')
+ h.endheaders()
+@@ -230,8 +230,8 @@
+ date= time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime())
+ fil.write("<style type=\"text\/css\"><!--BODY{font-family:sans-serif;}--></style>")
+ fil.write("<center><b>Meta<font color=\"#0000cc\">G</font><font color=\"#ff0000\">o</font><font color=\"#ffff00\">o</font>fil</b> results page for:</center>")
+- fil.write("<center><b>"+word+"</b></center>")
+- fil.write("<center>"+date+"</center>")
++ fil.write("<center><b>"+str(word)+"</b></center>")
++ fil.write("<center>"+str(date)+"</center>")
+ fil.write("<center><a href=\"http://www.edge-security.com\">By Edge-Security</a></center>")
+ fil.write("<hr>")
+ fil.write('<a href="#users">Results: Go directly to resuls.</a>')
+@@ -239,7 +239,7 @@
+ pathos=[]
+ for fi in all:
+ file = fi
+- print "[+] Searching in " + word + " for: " + file
++ print "[+] Searching in " + str(word) + " for: " + str(file)
+ total = int(howmany(word))
+ print "[+] Total results in google: "+ str(total)
+ if total == 0:
+@@ -247,7 +247,7 @@
+ else:
+ cant = 0
+ fil.write("<hr>")
+- fil.write("<strong><u>Searching in " + word + " for: " + file+" files.</u></strong><br><br>")
++ fil.write("<strong><u>Searching in " + str(word) + " for: " + str(file) +" files.</u></strong><br><br>")
+ if total < limit:
+ limit=total
+ print "[+] Limit: ",int(limit)
+@@ -265,14 +265,14 @@
+ fil.write("<strong>Total available files: "+str(total)+" </strong><br>")
+ t=0
+ if os.path.exists(dir):
+- print "[+] Directory "+ dir + " already exist, reusing it"
++ print "[+] Directory "+ str(dir) + " already exist, reusing it"
+ else:
+ os.mkdir(dir)
+ cantidad_todo=len(result)
+ contador=0
+ for x in result:
+ contador+=1
+- fil.write(x+"<br>")
++ fil.write(str(x)+"<br>")
+ try:
+ if down == "a" :
+ np = 0
+@@ -282,7 +282,7 @@
+ filename=res[leng-1]
+ try:
+ print "\t[ "+str(contador)+"/"+str(cantidad_todo)+" ] "+ x
+- if os.path.exists(dir+'/'+filename):
++ if os.path.exists(str(dir)+'/'+str(filename)):
+ pass
+ else:
+ urllib.urlretrieve(x,str(dir)+"/"+str(filename))
+@@ -290,9 +290,9 @@
+ print "Can't download"
+ np = 1
+ if np == 0:
+- fil.write("<br>Local copy " + "<a href=\""+dir+"/"+filename+'\">Open</a>')
++ fil.write("<br>Local copy " + "<a href=\""+str(dir)+"/"+str(filename)+'\">Open</a>')
+ fil.write("<br><br>Important metadata:")
+- command = extcommand +' '+ dir +'/'+'"'+filename+'"'
++ command = extcommand +' '+ str(dir) +'/'+'"'+str(filename)+'"'
+ try:
+ stdin,stderr = os.popen4(command)
+ except:
+@@ -378,7 +378,7 @@
+ fil.write('</pre>')
+ fil.write('<hr>')
+ else:
+- print "Can't Download "+ x
++ print "Can't Download "+ str(x)
+ fil.write("<br>Local copy, failed download :(\n")
+ fil.write('<hr>')
+ else:
+@@ -387,7 +387,7 @@
+ print "Process Interrupted by user\n"
+ sys.exit()
+ t+=1
+- fil.write("<strong>Total results for "+fi+": "+ str(t)+ "</strong><br>")
++ fil.write("<strong>Total results for "+str(fi)+": "+ str(t)+ "</strong><br>")
+ fil.write('<hr>')
+ fil.write('<a name="users">')
+ fil.write('<br>')
+@@ -417,7 +417,7 @@
+ if x.count('.'):
+ pass
+ else:
+- temp=temp+x+"\\"
++ temp=str(temp)+str(x)+"\\"
+ if paty.count(temp):
+ pass
+ else:
diff --git a/metagoofil.spec b/metagoofil.spec
index 95c0fe5..a204f83 100644
--- a/metagoofil.spec
+++ b/metagoofil.spec
@@ -1,13 +1,20 @@
Name: metagoofil
-Version: 1.4a
-Release: 5%{?dist}
+Version: 1.4b
+Release: 1%{?dist}
Summary: Meta-data analyzer, information gathering tool
Group: Applications/Internet
License: GPLv2
URL: http://www.edge-security.com/metagoofil.php
Source0: http://www.edge-security.com/soft/%{name}-%{version}.tar
+#Change path to libextract-extract executable
Patch0: %{name}-path.patch
+#Change implicit type change in string concatenation to explicit type conversion to str
+#Reported to cmartorella at edge-security.com on 15.08.2010
+Patch1: %{name}-str.patch
+#Fix matching of number of results in the google search page
+#Reported to cmartorella at edge-security.com on 15.08.2010
+Patch2: %{name}-howmany.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -22,8 +29,10 @@ of public documents (PDF,DOC,XLS,PPT,ODP,ODS) available in the target/victim
websites.
%prep
-%setup -q
+%setup -q -n %{name}
%patch0 -p 1 -b .path
+%patch1 -p 1 -b .str
+%patch2 -p 1 -b .howmany
chmod -x *
%build
@@ -50,6 +59,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Sun Aug 15 2010 Michal Ambroz <rebus at, seznam.cz> 1.4b-1
+- rebuild for new version
+
* Sat Apr 24 2010 Michal Ambroz <rebus at, seznam.cz> 1.4a-5
- Fix typo in libextractor file dependency
diff --git a/sources b/sources
index 1adc0db..16ba3ab 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-99bf874c4b831b47077c6055e6b05ca4 metagoofil-1.4a.tar
+ef1cd2a73338d69faaf2acad57c02fa0 metagoofil-1.4b.tar
More information about the scm-commits
mailing list