script for paste info
Signed-off-by: Ricky Elrod <codeblock@fedoraproject.org>
This commit is contained in:
parent
1fc22267f7
commit
1e615f9775
2 changed files with 19 additions and 0 deletions
14
roles/modernpaste/files/paste-info.py
Normal file
14
roles/modernpaste/files/paste-info.py
Normal 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)
|
|
@ -44,6 +44,11 @@
|
||||||
tags:
|
tags:
|
||||||
- modernpaste
|
- 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
|
- name: set sebooleans so paste can talk to the db
|
||||||
seboolean: name=httpd_can_network_connect_db state=true persistent=true
|
seboolean: name=httpd_can_network_connect_db state=true persistent=true
|
||||||
tags:
|
tags:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue