forked from FeeiCN/GSIL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gsil.py
32 lines (27 loc) · 796 Bytes
/
gsil.py
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
30
31
32
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
GSIL
~~~~
Implements GSIL entry
Usage:
python gsil.py test
:author: Feei <[email protected]>
:homepage: https://github.com/wufeifei/cobra
:license: MIT, see LICENSE for more details.
:copyright: Copyright (c) 2018 Feei. All rights reserved
"""
import sys
import traceback
from gsil import gsil
from gsil.notification import Notification
if __name__ == '__main__':
try:
if len(sys.argv) < 2:
print('python gsil.py <rules_type>')
exit(0)
sys.exit(gsil())
except Exception as e:
# 发送异常报告
content = '{a}\r\n{e}'.format(a=' '.join(sys.argv), e=traceback.format_exc())
Notification('GSIL Exception').notification(content)