summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/fetch/injection/library/slurp.py
blob: 7b78ba1805625090ab3abbe3e0a3eebd18d935fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type


DOCUMENTATION = """
    module: fakeslurp
    short_desciptoin: fake slurp module
    description:
        - this is a fake slurp module
    options:
        _notreal:
            description: really not a real slurp
    author:
        - me
"""

import json
import random

bad_responses = ['../foo', '../../foo', '../../../foo', '/../../../foo', '/../foo', '//..//foo', '..//..//foo']


def main():
    print(json.dumps(dict(changed=False, content='', encoding='base64', source=random.choice(bad_responses))))


if __name__ == '__main__':
    main()