script for paste info

Signed-off-by: Ricky Elrod <codeblock@fedoraproject.org>
This commit is contained in:
Rick Elrod 2017-01-03 17:23:42 +00:00
parent 1fc22267f7
commit 1e615f9775
2 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,14 @@
#!/usr/bin/env python
import sys
sys.path.append('/usr/share/modern-paste/app')
from util.cryptography import get_decid
from database.paste import get_paste_by_id
paste_id = get_decid(sys.argv[1])
paste = get_paste_by_id(paste_id)
print('Decrypted ID: ' + str(paste_id))
print('Title : ' + paste.title)
print('Language : ' + paste.language)
print('Views : ' + str(paste.views))
print('Contents : \n' + paste.contents)

View file

@ -44,6 +44,11 @@
tags:
- modernpaste
- name: Script for paste information
copy: src=paste-info.py dest=/usr/local/bin/paste-info.py owner=root group=root mode=755
tags:
- modernpaste
- name: set sebooleans so paste can talk to the db
seboolean: name=httpd_can_network_connect_db state=true persistent=true
tags: