Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Merged code in the issue #157 does not work

Đang mở
#174 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
api

Hướng nghiên cứu

Start by reproducing the issue with the two-rule YARA ruleset and the Python call yara.compile('bad_rule.yar', error_on_warning=True). Trace how the Python interface handles warnings from compilation and compare it with the command-line output. Done means error_on_warning reports both warnings instead of only the final warning.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Summary: the Issue #157 was about printing all the warnings with "error_on_warning" enabled. But at the example below we can see that it does not work at the newest version of yara-python.

Yara ruleset:

rule bad_rule1
{
    meta:
        author = "Rakovskij Stanislav / disasm.me"
        date = "01.03.2021"
        description = "Rule that uses bad wilecards to raise yara warning"
    strings:
        $ = {00 [32] 00}
    condition:
        any of them
}

rule bad_rule2
{
    meta:
        author = "Rakovskij Stanislav / disasm.me"
        date = "01.03.2021"
        description = "Rule that uses bad wilecards to raise yara warning"
    strings:
        $ = {00 [32] 00}
    condition:
        any of them
}

Output:

/m/d/test_yara_speed> ./yara64.exe bad_rule.yar random_100Mb.bin
bad_rule.yar(8): warning in rule "bad_rule1": $ is slowing down scanning
bad_rule.yar(20): warning in rule "bad_rule2": $ is slowing down scanning
bad_rule1 random_100Mb.bin
bad_rule2 random_100Mb.bin
/m/d/test_yara_speed> python3 -c "import yara; yara.compile('bad_rule.yar', error_on_warning=True)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
yara.WarningError: bad_rule.yar(20): $ is slowing down scanning  // <- expected two warnings - on lines 8 and 20, got only the last one. 
/m/d/test_yara_speed [1]> ./yara64.exe -v
4.0.5
/m/d/test_yara_speed> python3 -m pip install yara-python
Requirement already satisfied: yara-python in /home/user/.local/lib/python3.8/site-packages (4.0.5)
Ngôn ngữ chính
C
Star
754
Fork
190
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của VirusTotal/yara-python

Tất cả issue của VirusTotal/yara-python

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.