~ubuntu-branches/ubuntu/wily/bandit/wily-proposed

« back to all changes in this revision

Viewing changes to examples/paramiko_injection.py

  • Committer: Package Import Robot
  • Author(s): Dave Walker (Daviey)
  • Date: 2015-07-22 09:01:39 UTC
  • Revision ID: package-import@ubuntu.com-20150722090139-fl0nluy0x8m9ctx4
Tags: upstream-0.12.0
ImportĀ upstreamĀ versionĀ 0.12.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import paramiko
 
2
 
 
3
# this is not safe
 
4
paramiko.exec_command('something; reallly; unsafe')
 
5
 
 
6
# this is safe
 
7
paramiko.connect('somehost')
 
8
 
 
9
# this should not be detected
 
10
somelib.exec_command('this; is; indeterminately; unsafe')
 
11
 
 
12
# this is not safe
 
13
paramiko.invoke_shell('something; bad; here\n')
 
14
 
 
15
# should not be detected
 
16
somelib.invoke_shell('this; is; indeterminately; unsafe')
 
17