You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/fetch/injection/library/slurp.py

30 lines
659 B
Python

#!/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()