From cc384d9553290c8a96a22e00d4201c1be2266cf5 Mon Sep 17 00:00:00 2001 From: Lucas Hiago Date: Tue, 19 May 2020 23:23:08 -0300 Subject: [PATCH 1/2] Change the pull request github action file --- .github/workflows/{sherlock_test.yml => pull_request.yml} | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) rename .github/workflows/{sherlock_test.yml => pull_request.yml} (97%) diff --git a/.github/workflows/sherlock_test.yml b/.github/workflows/pull_request.yml similarity index 97% rename from .github/workflows/sherlock_test.yml rename to .github/workflows/pull_request.yml index 927c7ba9..b0425ff6 100644 --- a/.github/workflows/sherlock_test.yml +++ b/.github/workflows/pull_request.yml @@ -1,8 +1,6 @@ -name: Tests +name: Pull Request Action on: - push: - branches: [ master ] pull_request: branches: [ master ] From a6b201b3522143744fa61628c276f3ece600da08 Mon Sep 17 00:00:00 2001 From: Lucas Hiago Date: Tue, 19 May 2020 23:23:28 -0300 Subject: [PATCH 2/2] Create github action for branch master --- .github/workflows/main.yml | 33 +++++++++++++++++++++++++++++++++ README.md | 22 +++++++++++++--------- 2 files changed, 46 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..7fe207cc --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,33 @@ +name: Master + +on: + push: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.6, 3.7, 3.8] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Sherlock Site Detect Tests + run: | + cd sherlock && python -m unittest tests.all.SherlockDetectTests --verbose diff --git a/README.md b/README.md index 60263fc2..dea04dfc 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@
- + Website docker image @@ -31,13 +31,10 @@

- - - ## Demo Use this link to test Sherlock directly in your browser: -https://elody.com/scenario/plan/16/ + ## Installation @@ -55,6 +52,7 @@ $ cd sherlock # install the requirements $ python3 -m pip install -r requirements.txt ``` + [![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.png)](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/sherlock-project/sherlock&tutorial=README.md) ## Usage @@ -111,11 +109,13 @@ optional arguments: ``` To search for only one user: + ``` python3 sherlock user123 ``` To search for more than one user: + ``` python3 sherlock user1 user2 user3 ``` @@ -123,9 +123,11 @@ python3 sherlock user1 user2 user3 Accounts found will be stored in an individual text file with the corresponding username (e.g ```user123.txt```). ## Anaconda (Windows) Notes + If you are using Anaconda in Windows, using 'python3' might not work. Use 'python' instead. ## Docker Notes + If docker is installed you can build an image and run this as a container. ``` @@ -138,9 +140,9 @@ Once the image is built, sherlock can be invoked by running the following: docker run --rm -t mysherlock-image user123 ``` -The optional ```--rm``` flag removes the container filesystem on completion to prevent cruft build-up. See: https://docs.docker.com/engine/reference/run/#clean-up---rm +The optional ```--rm``` flag removes the container filesystem on completion to prevent cruft build-up. See: -The optional ```-t``` flag allocates a pseudo-TTY which allows colored output. See: https://docs.docker.com/engine/reference/run/#foreground +The optional ```-t``` flag allocates a pseudo-TTY which allows colored output. See: Use the following command to access the saved results: @@ -153,6 +155,7 @@ present working directory and to mount it at `/opt/sherlock/results` on the dock The `-o /opt/sherlock/results/text.txt` option tells `sherlock` to output the result. Or you can use "Docker Hub" to run `sherlock`: + ``` docker run theyahya/sherlock user123 ``` @@ -174,6 +177,7 @@ to understand the issues. **NOTE**: Sherlock is not accepting adult sites in the standard list. ## Tests + Thank you for contributing to Sherlock! Before creating a pull request with new development, please run the tests @@ -186,8 +190,8 @@ Sherlock. This invocation hides the progress text that Sherlock normally outputs, and instead shows the verbose output of the tests. ``` -$ cd sherlock -$ python3 -m unittest tests.all --verbose +cd sherlock +python3 -m unittest tests.all --verbose ``` Note that we do currently have 100% test coverage. Unfortunately, some of