This repository has been archived by the owner on Feb 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinfo.plist
122 lines (119 loc) · 3.28 KB
/
info.plist
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>bundleid</key>
<string>wooyun_search</string>
<key>connections</key>
<dict>
<key>BB9F1266-68B0-4833-94B6-F9C2377259BD</key>
<array>
<dict>
<key>destinationuid</key>
<string>EAD9AF7B-5751-4E23-8CFC-05B94777701B</string>
<key>modifiers</key>
<integer>0</integer>
<key>modifiersubtext</key>
<string></string>
</dict>
</array>
</dict>
<key>createdby</key>
<string>GaRY</string>
<key>description</key>
<string>Search Vulnerabilities in Wooyun.org</string>
<key>disabled</key>
<false/>
<key>name</key>
<string>Wooyun Search</string>
<key>objects</key>
<array>
<dict>
<key>config</key>
<dict>
<key>plusspaces</key>
<true/>
<key>url</key>
<string>{query}</string>
<key>utf8</key>
<true/>
</dict>
<key>type</key>
<string>alfred.workflow.action.openurl</string>
<key>uid</key>
<string>EAD9AF7B-5751-4E23-8CFC-05B94777701B</string>
</dict>
<dict>
<key>config</key>
<dict>
<key>argumenttype</key>
<integer>0</integer>
<key>escaping</key>
<integer>127</integer>
<key>keyword</key>
<string>wooyun</string>
<key>runningsubtext</key>
<string>请等待,正在搜索: {query} …</string>
<key>script</key>
<string>#coding=utf-8
import urllib2
import urllib
from xml.dom.minidom import Document
from BeautifulSoup import BeautifulSoup
params = urllib.urlencode({"q": "{query}"})
search = urllib2.urlopen('http://www.wooyun.org/searchbug.php?'+params).read()
html = BeautifulSoup(search)
doc = Document()
items = doc.createElement("items")
for item in html.find('div', attrs={ 'class' : 'search_content' }).ul.findAll('li'):
for t in item.findAll('a', attrs={ 'class' : 'atitle' }):
title = u''.join(t.findAll(text=True))
url = u'http://www.wooyun.org' + t['href']
xmlitem = doc.createElement("item")
xmlitem.setAttribute("uid", url)
xmlitem.setAttribute("arg", url)
xmlitem.setAttribute("autocomplete", title)
xmlitem.setAttribute("valid", "YES")
attr = doc.createElement("title")
attr.appendChild(doc.createTextNode(title))
xmlitem.appendChild(attr)
attr = doc.createElement("icon")
attr.appendChild(doc.createTextNode("icon.png"))
xmlitem.appendChild(attr)
items.appendChild(xmlitem)
doc.appendChild(items)
print doc.toxml().encode('utf-8')</string>
<key>subtext</key>
<string>搜索wooyun上的漏洞</string>
<key>title</key>
<string>Wooyun Search</string>
<key>type</key>
<integer>3</integer>
<key>withspace</key>
<true/>
</dict>
<key>type</key>
<string>alfred.workflow.input.scriptfilter</string>
<key>uid</key>
<string>BB9F1266-68B0-4833-94B6-F9C2377259BD</string>
</dict>
</array>
<key>readme</key>
<string></string>
<key>uidata</key>
<dict>
<key>BB9F1266-68B0-4833-94B6-F9C2377259BD</key>
<dict>
<key>ypos</key>
<real>20</real>
</dict>
<key>EAD9AF7B-5751-4E23-8CFC-05B94777701B</key>
<dict>
<key>ypos</key>
<real>20</real>
</dict>
</dict>
<key>webaddress</key>
<string>http://github.com/wofeiwo/alfred-wooyun-search</string>
</dict>
</plist>