Spaces:
Sleeping
Sleeping
using yara_rules.match()
Browse files
app.py
CHANGED
|
@@ -368,10 +368,11 @@ async def analyse_yara(file_name: str):
|
|
| 368 |
)
|
| 369 |
|
| 370 |
try:
|
| 371 |
-
matches = await run_in_threadpool(
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
)
|
|
|
|
| 375 |
if matches:
|
| 376 |
return {"result": "Found",
|
| 377 |
"matches": [{
|
|
|
|
| 368 |
)
|
| 369 |
|
| 370 |
try:
|
| 371 |
+
# matches = await run_in_threadpool(
|
| 372 |
+
# app.state.yara_rules.match,
|
| 373 |
+
# file_path
|
| 374 |
+
# )
|
| 375 |
+
matches = app.state.yara_rules.match(file_path)
|
| 376 |
if matches:
|
| 377 |
return {"result": "Found",
|
| 378 |
"matches": [{
|