Skip to content

Commit 92d5c36

Browse files
authored
Add download link for .symbols file (#36)
Allows for faster greping for multiple offsets locally.
1 parent d35f85c commit 92d5c36

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

searchengine/api.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ components:
7878
type: string
7979
format: url
8080
readOnly: true
81+
symbols_url:
82+
type: string
83+
format: url
84+
readOnly: true
8185

8286
DumpRequest:
8387
type: object

searchengine/app.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ def find(body, extra_symbols=[]):
7676
'sha256': doc.get('sha256'),
7777
'symbols': result_symbols,
7878
'download_url': config.DOWNLOAD_URL.format(id),
79+
'symbols_url': config.ALL_SYMBOLS_URL.format(id),
7980
})
8081
return libcs
8182

searchengine/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@
1919
'printf',
2020
]
2121
DOWNLOAD_URL = 'https://libc.rip/download/{}.so'
22+
ALL_SYMBOLS_URL = 'https://libc.rip/download/{}.symbols'

searchengine/frontend/src/App.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ function SearchForm({ onSearch = () => {} }) {
188188
);
189189
}
190190

191-
function Result({ id, buildid, md5, symbols, download_url }) {
191+
function Result({ id, buildid, md5, symbols, download_url, symbols_url }) {
192192
const classes = useStyles();
193193
const [open, setOpen] = useState(false);
194194

@@ -216,6 +216,12 @@ function Result({ id, buildid, md5, symbols, download_url }) {
216216
<Link href={download_url} download>Click to download</Link>
217217
</TableCell>
218218
</TableRow>
219+
<TableRow>
220+
<TableCell>All Symbols</TableCell>
221+
<TableCell>
222+
<Link href={symbols_url} download>Click to download</Link>
223+
</TableCell>
224+
</TableRow>
219225
<TableRow>
220226
<TableCell>BuildID</TableCell>
221227
<TableCell>{buildid}</TableCell>

0 commit comments

Comments
 (0)