Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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