GithubHelp home page GithubHelp logo

glmcdona / binary2strings Goto Github PK

View Code? Open in Web Editor NEW
49.0 49.0 9.0 45.94 MB

Python module to extract Ascii, Utf8, and Unicode strings from binary data. Lightning fast wrapper around c++ compiled code.

License: MIT License

Python 13.24% C++ 86.76%

binary2strings's People

Contributors

glmcdona avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

binary2strings's Issues

Unable to install

Hello,

When trying to install binary2strings via pip, I get the following error:

$ pip install binary2strings

Collecting binary2strings
  Downloading binary2strings-0.1.5.tar.gz (4.4 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-drqgf3ft/binary2strings_a67e0f0eeb3f43679878c54527d48f08/setup.py", line 99, in <module>
          with open("readme.md", "r") as fh:
      FileNotFoundError: [Errno 2] No such file or directory: 'readme.md'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

I forked this repo and changed readme.md to README.md, but now I get the following error when attempting to install via setup.py:

$ python3 setup.py install

/home/user/comp_id_poc/binary2strings/setup.py:9: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.version import LooseVersion
running install
/home/user/comp_id_poc/poc/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/home/user/comp_id_poc/poc/lib/python3.10/site-packages/setuptools/command/easy_install.py:158: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
running bdist_egg
running egg_info
writing src/binary2strings.egg-info/PKG-INFO
writing dependency_links to src/binary2strings.egg-info/dependency_links.txt
writing top-level names to src/binary2strings.egg-info/top_level.txt
reading manifest file 'src/binary2strings.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'src/binary2strings.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- pybind11 v2.9.2 
-- Found PythonInterp: /home/user/comp_id_poc/poc/bin/python3 (found version "3.10.6") 
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.10.so
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/comp_id_poc/binary2strings/build/temp.linux-x86_64-3.10
[ 50%] Building CXX object CMakeFiles/binary2strings.dir/src/binary2strings/extracted_string.cpp.o
[ 50%] Building CXX object CMakeFiles/binary2strings.dir/src/binary2strings/binary2strings.cpp.o
/home/user/comp_id_poc/binary2strings/src/binary2strings/extracted_string.cpp:6:6: error: ‘wstring_convert’ in namespace ‘std’ does not name a template type
    6 | std::wstring_convert<std::codecvt_utf8<wchar_t>> _converter;
      |      ^~~~~~~~~~~~~~~
/home/user/comp_id_poc/binary2strings/src/binary2strings/extracted_string.cpp: In constructor ‘extracted_string::extracted_string(const wchar_t*, size_t, STRING_TYPE, int, int)’:
/home/user/comp_id_poc/binary2strings/src/binary2strings/extracted_string.cpp:31:20: error: ‘_converter’ was not declared in this scope
   31 |         m_string = _converter.to_bytes(string, string + size_in_bytes / 2);
      |                    ^~~~~~~~~~
/home/user/comp_id_poc/binary2strings/src/binary2strings/extracted_string.cpp: In member function ‘float extracted_string::get_proba_interesting()’:
/home/user/comp_id_poc/binary2strings/src/binary2strings/extracted_string.cpp:91:31: error: ‘exp’ was not declared in this scope
   91 |         return 1.0f / (1.0f + exp(-score));
      |                               ^~~
/home/user/comp_id_poc/binary2strings/src/binary2strings/binary2strings.cpp:100:11: error: expected constructor, destructor, or type conversion before ‘(’ token
  100 | __declspec(safebuffers) extracted_string* try_extract_string(const unsigned char* buffer, size_t buffer_size, long offset, size_t min_chars)
      |           ^
gmake[2]: *** [CMakeFiles/binary2strings.dir/build.make:90: CMakeFiles/binary2strings.dir/src/binary2strings/extracted_string.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: *** [CMakeFiles/binary2strings.dir/build.make:76: CMakeFiles/binary2strings.dir/src/binary2strings/binary2strings.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:100: CMakeFiles/binary2strings.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
Traceback (most recent call last):
  File "/home/user/comp_id_poc/binary2strings/setup.py", line 101, in <module>
    setup(
  File "/home/user/comp_id_poc/poc/lib/python3.10/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.10/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.10/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.10/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/user/comp_id_poc/poc/lib/python3.10/site-packages/setuptools/command/install.py", line 74, in run
    self.do_egg_install()
  File "/home/user/comp_id_poc/poc/lib/python3.10/site-packages/setuptools/command/install.py", line 116, in do_egg_install
    self.run_command('bdist_egg')
  File "/usr/lib/python3.10/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.10/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/user/comp_id_poc/poc/lib/python3.10/site-packages/setuptools/command/bdist_egg.py", line 164, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "/home/user/comp_id_poc/poc/lib/python3.10/site-packages/setuptools/command/bdist_egg.py", line 150, in call_command
    self.run_command(cmdname)
  File "/usr/lib/python3.10/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.10/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/user/comp_id_poc/poc/lib/python3.10/site-packages/setuptools/command/install_lib.py", line 23, in run
    self.build()
  File "/usr/lib/python3.10/distutils/command/install_lib.py", line 109, in build
    self.run_command('build_ext')
  File "/usr/lib/python3.10/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.10/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/user/comp_id_poc/binary2strings/setup.py", line 38, in run
    self.build_extension(ext)
  File "/home/user/comp_id_poc/binary2strings/setup.py", line 68, in build_extension
    subprocess.check_call(['cmake', '--build', '.'] + build_args,
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.

This is a bit above my skill level at this point. Any ideas? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.