Skip to content

Instantly share code, notes, and snippets.

@yehgdotnet
Last active December 8, 2019 20:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save yehgdotnet/074ab79528ccdac7653bb641beb3b7c5 to your computer and use it in GitHub Desktop.
Save yehgdotnet/074ab79528ccdac7653bb641beb3b7c5 to your computer and use it in GitHub Desktop.
pyt scan wrapper (Windows bash script)
# https://github.com/python-security/pyt - python secure code scanner
@echo off
IF %1.==. GOTO No1
IF %2.==. GOTO Missing_Argument
set dir=%1
set type=%2
dir /s /b %dir% | find ".py" > source_listing.txt
for /F "tokens=*" %%A in (source_listing.txt) do echo. && echo Scanning %%A && pyt -a %type% -f "%%A"
GOTO End1
:No1
GOTO Missing_Argument
:Missing_Argument
@echo.
echo Usage: scan.bat source_directory type(Flask, Django,Every or Pylons)
@echo.
echo e.g.
echo scan "example\django.nV" Django
GOTO End1
:End1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment