Skip to content

Commit

Permalink
Add download link for .symbols file (#36)
Browse files Browse the repository at this point in the history
Allows for faster greping for multiple offsets locally.
  • Loading branch information
peace-maker authored Oct 19, 2020
1 parent d35f85c commit 92d5c36
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions searchengine/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ components:
type: string
format: url
readOnly: true
symbols_url:
type: string
format: url
readOnly: true

DumpRequest:
type: object
Expand Down
1 change: 1 addition & 0 deletions searchengine/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def find(body, extra_symbols=[]):
'sha256': doc.get('sha256'),
'symbols': result_symbols,
'download_url': config.DOWNLOAD_URL.format(id),
'symbols_url': config.ALL_SYMBOLS_URL.format(id),
})
return libcs

Expand Down
1 change: 1 addition & 0 deletions searchengine/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@
'printf',
]
DOWNLOAD_URL = 'https://libc.rip/download/{}.so'
ALL_SYMBOLS_URL = 'https://libc.rip/download/{}.symbols'
8 changes: 7 additions & 1 deletion searchengine/frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ function SearchForm({ onSearch = () => {} }) {
);
}

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

Expand Down Expand Up @@ -216,6 +216,12 @@ function Result({ id, buildid, md5, symbols, download_url }) {
<Link href={download_url} download>Click to download</Link>
</TableCell>
</TableRow>
<TableRow>
<TableCell>All Symbols</TableCell>
<TableCell>
<Link href={symbols_url} download>Click to download</Link>
</TableCell>
</TableRow>
<TableRow>
<TableCell>BuildID</TableCell>
<TableCell>{buildid}</TableCell>
Expand Down

0 comments on commit 92d5c36

Please sign in to comment.