From fd2c681e42a7d559e48002e4d987a297ebe20e97 Mon Sep 17 00:00:00 2001 From: L1ghtn1ng Date: Sat, 12 Oct 2019 23:27:39 +0100 Subject: [PATCH 1/5] Update ci and dockerfile to use pipenv --- .github/workflows/theHarvester.yml | 6 +++++- .travis.yml | 3 ++- Dockerfile | 4 ++-- README.md | 4 ++-- requirements.txt | 14 -------------- 5 files changed, 11 insertions(+), 20 deletions(-) delete mode 100644 requirements.txt diff --git a/.github/workflows/theHarvester.yml b/.github/workflows/theHarvester.yml index a958f8ee..b9434ecd 100644 --- a/.github/workflows/theHarvester.yml +++ b/.github/workflows/theHarvester.yml @@ -23,9 +23,13 @@ jobs: uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} + - name: Install pipenv + run: | + pip install pipenv + - name: Install dependencies run: | - pip install -r requirements.txt + pipenv install - name: Run theHarvester module baidu run: | diff --git a/.travis.yml b/.travis.yml index 815485b6..2c9f9cf1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,8 @@ matrix: - python: '3.8-dev' env: TEST_SUITE=suite_3_8_dev before_install: - - pip install -r requirements.txt + - pip install pipenv + - pipenv install install: - python setup.py test script: diff --git a/Dockerfile b/Dockerfile index 5e096937..fd05a086 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ RUN mkdir /app WORKDIR /app COPY . /app RUN apt-get -qq update -RUN apt-get install -yqq python3-pip -RUN pip3 install -r requirements.txt +RUN apt-get install -yqq pipenv +RUN pipenv install RUN chmod +x *.py ENTRYPOINT ["/app/theHarvester.py"] diff --git a/README.md b/README.md index 926505b1..8f17e7cc 100644 --- a/README.md +++ b/README.md @@ -86,8 +86,8 @@ Add your keys to api-keys.yaml Dependencies: ------------- * Python 3.7+ -* python3 -m pip install -r requirements.txt -* Recommend that you use a virtualenv when cloning from git +* python3 -m pip install pipenv +* pipenv install Comments, bugs, or requests? ---------------------------- diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 4bff3330..00000000 --- a/requirements.txt +++ /dev/null @@ -1,14 +0,0 @@ -aiodns==2.0.0 -beautifulsoup4==4.8.0 -dnspython==1.16.0 -flake8==3.7.8 -grequests==0.4.0 -mypy==0.730 -netaddr==0.7.19 -plotly==4.1.1 -pytest==5.2.0 -PyYaml==5.1.2 -requests==2.22.0 -shodan==1.19.0 -texttable==1.6.2 -retrying==1.3.3 \ No newline at end of file From 910ad7bf27e40db54f3b920a80fc6f50d6411e41 Mon Sep 17 00:00:00 2001 From: L1ghtn1ng Date: Sat, 12 Oct 2019 23:41:15 +0100 Subject: [PATCH 2/5] Update ci and dockerfile --- .github/workflows/theHarvester.yml | 44 +++++++++++++++--------------- .travis.yml | 8 +++--- Dockerfile | 2 +- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/theHarvester.yml b/.github/workflows/theHarvester.yml index b9434ecd..5b6273a9 100644 --- a/.github/workflows/theHarvester.yml +++ b/.github/workflows/theHarvester.yml @@ -33,89 +33,89 @@ jobs: - name: Run theHarvester module baidu run: | - python theHarvester.py -d metasploit.com -b baidu + pipenv run theHarvester.py -d metasploit.com -b baidu - name: Run theHarvester module bing run: | - python theHarvester.py -d metasploit.com -b bing + pipenv run theHarvester.py -d metasploit.com -b bing - name: Run theHarvester module crtsh run: | - python theHarvester.py -d metasploit.com -b crtsh + pipenv run theHarvester.py -d metasploit.com -b crtsh - name: Run theHarvester module dnsdumpster run: | - python theHarvester.py -d metasploit.com -b dnsdumpster + pipenv run theHarvester.py -d metasploit.com -b dnsdumpster - name: Run theHarvester module dogplie run: | - python theHarvester.py -d metasploit.com -b dogpile + pipenv run theHarvester.py -d metasploit.com -b dogpile - name: Run theHarvester module duckduckgo run: | - python theHarvester.py -d metasploit.com -b duckduckgo + pipenv run theHarvester.py -d metasploit.com -b duckduckgo - name: Run theHarvester module exalead run: | - python theHarvester.py -d metasploit.com -b exalead + pipenv run theHarvester.py -d metasploit.com -b exalead - name: Run theHarvester module google run: | - python theHarvester.py -d metasploit.com -b google + pipenv run theHarvester.py -d metasploit.com -b google - name: Run theHarvester module Intelx run: | - python theHarvester.py -d metasploit.com -b intelx + pipenv run theHarvester.py -d metasploit.com -b intelx - name: Run theHarvester module linkedin run: | - python theHarvester.py -d metasploit.com -b linkedin + pipenv run theHarvester.py -d metasploit.com -b linkedin - name: Run theHarvester module linkedin_links run: | - python theHarvester.py -d metasploit.com -b linkedin_links + pipenv run theHarvester.py -d metasploit.com -b linkedin_links - name: Run theHarvester module netcraft run: | - python theHarvester.py -d metasploit.com -b netcraft + pipenv run theHarvester.py -d metasploit.com -b netcraft - name: Run theHarvester module Otx run: | - python theHarvester.py -d metasploit.com -b otx + pipenv run theHarvester.py -d metasploit.com -b otx - name: Run theHarvester module Suip run: | - python theHarvester.py -d metasploit.com -b suip + pipenv run theHarvester.py -d metasploit.com -b suip - name: Run theHarvester module threatcrowd run: | - python theHarvester.py -d metasploit.com -b threatcrowd + pipenv run theHarvester.py -d metasploit.com -b threatcrowd - name: Run theHarvester module trello run: | - python theHarvester.py -d metasploit.com -b trello + pipenv run theHarvester.py -d metasploit.com -b trello - name: Run theHarvester module twitter run: | - python theHarvester.py -d metasploit.com -b twitter + pipenv run theHarvester.py -d metasploit.com -b twitter - name: Run theHarvester module virustotal run: | - python theHarvester.py -d metasploit.com -b virustotal + pipenv run theHarvester.py -d metasploit.com -b virustotal - name: Run theHarvester module yahoo run: | - python theHarvester.py -d metasploit.com -b yahoo + pipenv run theHarvester.py -d metasploit.com -b yahoo - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names - flake8 . --count --show-source --statistics + pipenv run flake8 . --count --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-line-length=127 --statistics + pipenv run flake8 . --count --exit-zero --max-line-length=127 --statistics - name: Test with pytest run: | - pytest + pipenv run pytest # - name: Static type checking with mypy # run: | # mypy --pretty *.py \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 2c9f9cf1..b3e5f060 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,11 +11,11 @@ before_install: - pip install pipenv - pipenv install install: -- python setup.py test +- pipenv run setup.py test script: -- python theHarvester.py -d metasploit.com -b baidu,bing,crtsh,dnsdumpster,dogpile,duckduckgo,exalead,linkedin,netcraft,otx,intelx,threatcrowd,trello,twitter,virustotal,yahoo -l 200 -- pytest -- flake8 . --count --show-source --statistics +- pipenv run theHarvester.py -d metasploit.com -b baidu,bing,crtsh,dnsdumpster,dogpile,duckduckgo,exalead,linkedin,netcraft,otx,intelx,threatcrowd,trello,twitter,virustotal,yahoo -l 200 +- pipenv run pytest +- pipenv run flake8 . --count --show-source --statistics #- mypy --pretty *.py notifications: email: false diff --git a/Dockerfile b/Dockerfile index fd05a086..85449499 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,4 +6,4 @@ RUN apt-get -qq update RUN apt-get install -yqq pipenv RUN pipenv install RUN chmod +x *.py -ENTRYPOINT ["/app/theHarvester.py"] +ENTRYPOINT ["pipenv run /app/theHarvester.py"] From b41665c569e520e00cc963efa8c7713c9173010e Mon Sep 17 00:00:00 2001 From: L1ghtn1ng Date: Sat, 12 Oct 2019 23:45:32 +0100 Subject: [PATCH 3/5] Revert "Update ci and dockerfile to use pipenv" This reverts commit fd2c681e --- .github/workflows/theHarvester.yml | 6 +----- .travis.yml | 3 +-- Dockerfile | 4 ++-- README.md | 4 ++-- requirements.txt | 14 ++++++++++++++ 5 files changed, 20 insertions(+), 11 deletions(-) create mode 100644 requirements.txt diff --git a/.github/workflows/theHarvester.yml b/.github/workflows/theHarvester.yml index 5b6273a9..00578d2a 100644 --- a/.github/workflows/theHarvester.yml +++ b/.github/workflows/theHarvester.yml @@ -23,13 +23,9 @@ jobs: uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - - name: Install pipenv - run: | - pip install pipenv - - name: Install dependencies run: | - pipenv install + pip install -r requirements.txt - name: Run theHarvester module baidu run: | diff --git a/.travis.yml b/.travis.yml index b3e5f060..546744ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,7 @@ matrix: - python: '3.8-dev' env: TEST_SUITE=suite_3_8_dev before_install: - - pip install pipenv - - pipenv install + - pip install -r requirements.txt install: - pipenv run setup.py test script: diff --git a/Dockerfile b/Dockerfile index 85449499..e75db12b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ RUN mkdir /app WORKDIR /app COPY . /app RUN apt-get -qq update -RUN apt-get install -yqq pipenv -RUN pipenv install +RUN apt-get install -yqq python3-pip +RUN pip3 install -r requirements.txt RUN chmod +x *.py ENTRYPOINT ["pipenv run /app/theHarvester.py"] diff --git a/README.md b/README.md index 8f17e7cc..926505b1 100644 --- a/README.md +++ b/README.md @@ -86,8 +86,8 @@ Add your keys to api-keys.yaml Dependencies: ------------- * Python 3.7+ -* python3 -m pip install pipenv -* pipenv install +* python3 -m pip install -r requirements.txt +* Recommend that you use a virtualenv when cloning from git Comments, bugs, or requests? ---------------------------- diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..4bff3330 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,14 @@ +aiodns==2.0.0 +beautifulsoup4==4.8.0 +dnspython==1.16.0 +flake8==3.7.8 +grequests==0.4.0 +mypy==0.730 +netaddr==0.7.19 +plotly==4.1.1 +pytest==5.2.0 +PyYaml==5.1.2 +requests==2.22.0 +shodan==1.19.0 +texttable==1.6.2 +retrying==1.3.3 \ No newline at end of file From b54790e4b14e80b4f30b0d99a343159137250e84 Mon Sep 17 00:00:00 2001 From: L1ghtn1ng Date: Sat, 12 Oct 2019 23:46:18 +0100 Subject: [PATCH 4/5] Revert "Update ci and dockerfile" This reverts commit 910ad7bf --- .github/workflows/theHarvester.yml | 44 +++++++++++++++--------------- .travis.yml | 8 +++--- Dockerfile | 2 +- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/theHarvester.yml b/.github/workflows/theHarvester.yml index 00578d2a..a958f8ee 100644 --- a/.github/workflows/theHarvester.yml +++ b/.github/workflows/theHarvester.yml @@ -29,89 +29,89 @@ jobs: - name: Run theHarvester module baidu run: | - pipenv run theHarvester.py -d metasploit.com -b baidu + python theHarvester.py -d metasploit.com -b baidu - name: Run theHarvester module bing run: | - pipenv run theHarvester.py -d metasploit.com -b bing + python theHarvester.py -d metasploit.com -b bing - name: Run theHarvester module crtsh run: | - pipenv run theHarvester.py -d metasploit.com -b crtsh + python theHarvester.py -d metasploit.com -b crtsh - name: Run theHarvester module dnsdumpster run: | - pipenv run theHarvester.py -d metasploit.com -b dnsdumpster + python theHarvester.py -d metasploit.com -b dnsdumpster - name: Run theHarvester module dogplie run: | - pipenv run theHarvester.py -d metasploit.com -b dogpile + python theHarvester.py -d metasploit.com -b dogpile - name: Run theHarvester module duckduckgo run: | - pipenv run theHarvester.py -d metasploit.com -b duckduckgo + python theHarvester.py -d metasploit.com -b duckduckgo - name: Run theHarvester module exalead run: | - pipenv run theHarvester.py -d metasploit.com -b exalead + python theHarvester.py -d metasploit.com -b exalead - name: Run theHarvester module google run: | - pipenv run theHarvester.py -d metasploit.com -b google + python theHarvester.py -d metasploit.com -b google - name: Run theHarvester module Intelx run: | - pipenv run theHarvester.py -d metasploit.com -b intelx + python theHarvester.py -d metasploit.com -b intelx - name: Run theHarvester module linkedin run: | - pipenv run theHarvester.py -d metasploit.com -b linkedin + python theHarvester.py -d metasploit.com -b linkedin - name: Run theHarvester module linkedin_links run: | - pipenv run theHarvester.py -d metasploit.com -b linkedin_links + python theHarvester.py -d metasploit.com -b linkedin_links - name: Run theHarvester module netcraft run: | - pipenv run theHarvester.py -d metasploit.com -b netcraft + python theHarvester.py -d metasploit.com -b netcraft - name: Run theHarvester module Otx run: | - pipenv run theHarvester.py -d metasploit.com -b otx + python theHarvester.py -d metasploit.com -b otx - name: Run theHarvester module Suip run: | - pipenv run theHarvester.py -d metasploit.com -b suip + python theHarvester.py -d metasploit.com -b suip - name: Run theHarvester module threatcrowd run: | - pipenv run theHarvester.py -d metasploit.com -b threatcrowd + python theHarvester.py -d metasploit.com -b threatcrowd - name: Run theHarvester module trello run: | - pipenv run theHarvester.py -d metasploit.com -b trello + python theHarvester.py -d metasploit.com -b trello - name: Run theHarvester module twitter run: | - pipenv run theHarvester.py -d metasploit.com -b twitter + python theHarvester.py -d metasploit.com -b twitter - name: Run theHarvester module virustotal run: | - pipenv run theHarvester.py -d metasploit.com -b virustotal + python theHarvester.py -d metasploit.com -b virustotal - name: Run theHarvester module yahoo run: | - pipenv run theHarvester.py -d metasploit.com -b yahoo + python theHarvester.py -d metasploit.com -b yahoo - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names - pipenv run flake8 . --count --show-source --statistics + flake8 . --count --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - pipenv run flake8 . --count --exit-zero --max-line-length=127 --statistics + flake8 . --count --exit-zero --max-line-length=127 --statistics - name: Test with pytest run: | - pipenv run pytest + pytest # - name: Static type checking with mypy # run: | # mypy --pretty *.py \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 546744ab..815485b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,11 +10,11 @@ matrix: before_install: - pip install -r requirements.txt install: -- pipenv run setup.py test +- python setup.py test script: -- pipenv run theHarvester.py -d metasploit.com -b baidu,bing,crtsh,dnsdumpster,dogpile,duckduckgo,exalead,linkedin,netcraft,otx,intelx,threatcrowd,trello,twitter,virustotal,yahoo -l 200 -- pipenv run pytest -- pipenv run flake8 . --count --show-source --statistics +- python theHarvester.py -d metasploit.com -b baidu,bing,crtsh,dnsdumpster,dogpile,duckduckgo,exalead,linkedin,netcraft,otx,intelx,threatcrowd,trello,twitter,virustotal,yahoo -l 200 +- pytest +- flake8 . --count --show-source --statistics #- mypy --pretty *.py notifications: email: false diff --git a/Dockerfile b/Dockerfile index e75db12b..5e096937 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,4 +6,4 @@ RUN apt-get -qq update RUN apt-get install -yqq python3-pip RUN pip3 install -r requirements.txt RUN chmod +x *.py -ENTRYPOINT ["pipenv run /app/theHarvester.py"] +ENTRYPOINT ["/app/theHarvester.py"] From df146317e7b6b62957a7237eabf59125c4d81b1a Mon Sep 17 00:00:00 2001 From: L1ghtn1ng Date: Sat, 12 Oct 2019 23:48:20 +0100 Subject: [PATCH 5/5] Update readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 926505b1..8f17e7cc 100644 --- a/README.md +++ b/README.md @@ -86,8 +86,8 @@ Add your keys to api-keys.yaml Dependencies: ------------- * Python 3.7+ -* python3 -m pip install -r requirements.txt -* Recommend that you use a virtualenv when cloning from git +* python3 -m pip install pipenv +* pipenv install Comments, bugs, or requests? ----------------------------