|
87 | 87 |
|
88 | 88 | from efilter.protocols import applicative |
89 | 89 | from efilter.protocols import associative |
90 | | -from efilter.protocols import counted |
91 | 90 | from efilter.protocols import repeated |
92 | 91 | from efilter.protocols import structured |
93 | 92 |
|
94 | 93 | from rekall import obj |
95 | 94 | from rekall import plugin |
96 | 95 | from rekall import testlib |
| 96 | +from rekall.plugins.response import common |
97 | 97 | from rekall.plugins.overlays import basic |
98 | 98 | from rekall.plugins.common.efilter_plugins import helpers |
99 | 99 | from rekall.ui import identity as identity_renderer |
@@ -443,6 +443,14 @@ def _get_scopes(self): |
443 | 443 | scopes["timestamp"] = api.user_func( |
444 | 444 | lambda x, **_: basic.UnixTimeStamp(value=x, session=self.session), |
445 | 445 | arg_types=[float, int, long]) |
| 446 | + |
| 447 | + # This function is used to indicate that the string represents |
| 448 | + # a filename. This will cause the agent to upload it if the |
| 449 | + # user requested uploading files. |
| 450 | + # > select file(path.filename.name).filename.name from glob("/*") |
| 451 | + scopes["file"] = api.user_func( |
| 452 | + lambda x: common.FileInformation(session=self.session, filename=x), |
| 453 | + arg_types=[unicode, str]) |
446 | 454 | return scopes |
447 | 455 |
|
448 | 456 | # IStructured implementation for EFILTER: |
|
0 commit comments