BVB Source Codes

x64dbg Show atoms.h Source code

Return Download x64dbg: download atoms.h Source code - Download x64dbg Source code - Type:.h
  1. /*
  2. Copyright (c) 2013. The YARA Authors. All Rights Reserved.
  3.  
  4. Redistribution and use in source and binary forms, with or without modification,
  5. are permitted provided that the following conditions are met:
  6.  
  7. 1. Redistributions of source code must retain the above copyright notice, this
  8. list of conditions and the following disclaimer.
  9.  
  10. 2. Redistributions in binary form must reproduce the above copyright notice,
  11. this list of conditions and the following disclaimer in the documentation and/or
  12. other materials provided with the distribution.
  13.  
  14. 3. Neither the name of the copyright holder nor the names of its contributors
  15. may be used to endorse or promote products derived from this software without
  16. specific prior written permission.
  17.  
  18. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  19. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  20. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  21. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
  22. ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  23. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  24. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  25. ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  26. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  27. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  28. */
  29.  
  30. #ifndef YR_ATOMS_H
  31. #define YR_ATOMS_H
  32.  
  33. #include "limits.h"
  34. #include "re.h"
  35.  
  36. #define ATOM_TREE_LEAF  1
  37. #define ATOM_TREE_AND   2
  38. #define ATOM_TREE_OR    3
  39.  
  40.  
  41. typedef struct _ATOM_TREE_NODE
  42. {
  43.     uint8_t type;
  44.     uint8_t atom_length;
  45.     uint8_t atom[MAX_ATOM_LENGTH];
  46.  
  47.     uint8_t* forward_code;
  48.     uint8_t* backward_code;
  49.  
  50.     RE_NODE* recent_nodes[MAX_ATOM_LENGTH];
  51.  
  52.     struct _ATOM_TREE_NODE* children_head;
  53.     struct _ATOM_TREE_NODE* children_tail;
  54.     struct _ATOM_TREE_NODE* next_sibling;
  55.  
  56. } ATOM_TREE_NODE;
  57.  
  58.  
  59. typedef struct _ATOM_TREE
  60. {
  61.     ATOM_TREE_NODE* current_leaf;
  62.     ATOM_TREE_NODE* root_node;
  63.  
  64. } ATOM_TREE;
  65.  
  66.  
  67. typedef struct _YR_ATOM_LIST_ITEM
  68. {
  69.     uint8_t atom_length;
  70.     uint8_t atom[MAX_ATOM_LENGTH];
  71.  
  72.     uint16_t backtrack;
  73.  
  74.     uint8_t* forward_code;
  75.     uint8_t* backward_code;
  76.  
  77.     struct _YR_ATOM_LIST_ITEM* next;
  78.  
  79. } YR_ATOM_LIST_ITEM;
  80.  
  81.  
  82. int yr_atoms_extract_from_re(
  83.     RE* re,
  84.     int flags,
  85.     YR_ATOM_LIST_ITEM** atoms);
  86.  
  87.  
  88. int yr_atoms_extract_from_string(
  89.     uint8_t* string,
  90.     int string_length,
  91.     int flags,
  92.     YR_ATOM_LIST_ITEM** atoms);
  93.  
  94.  
  95. int yr_atoms_min_quality(
  96.     YR_ATOM_LIST_ITEM* atom_list);
  97.  
  98.  
  99. void yr_atoms_list_destroy(
  100.     YR_ATOM_LIST_ITEM* list_head);
  101.  
  102. #endif
  103.  
downloadatoms.h Source code - Download x64dbg Source code
Related Source Codes/Software:
pencil - Multiplatform GUI Prototyping/Wireframing 2017-04-16
rainloop-webmail - Simple, modern & fast web-based email client ... 2017-04-16
qt - Qt binding for Go (Golang) which supports Windows ... 2017-04-16
MLeaksFinder - Find memory leaks in your iOS app at develop time. 2017-04-16
jsfeat - JavaScript Computer Vision library. 2017-04-16
later - A javascript library for defining recurring schedu... 2017-04-16
Android-ItemTouchHelper-Demo - Basic example of using ItemTouchHelper to add drag... 2017-04-16
onionshare - Securely and anonymously share a file of any size ... 2017-04-16
android-viewflow - A horizontal view scroller library for Android 2017-04-16
css-in-js - React: CSS in JS techniques comparison. 2017-04-16
mama2 - Mother plan - all firewood high flame 2017-04-23
BlurEffectForAndroidDesign - Sample to show how to implement blur graphical tri... 2017-04-23
sphinx_rtd_theme - Sphinx theme for readthedocs.org 2017-04-23
rouge - A pure-ruby code highlighter that is compatible wi... 2017-04-23
spring-security-oauth - Support for adding OAuth1(a) and OAuth2 features (... 2017-04-23
Toucan - Fabulous Image Processing in Swift 2017-04-23
CoffeeScriptRedux - 2017-04-23
breakpoint - Really simple media queries in Sa 2017-04-23
libsvm - 2017-04-22
grr - GRR Rapid Response: remote live forensics for inci... 2017-04-22

 Back to top