Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC ] Support Windows #15

Open
pcy190 opened this issue May 1, 2020 · 2 comments
Open

[RFC ] Support Windows #15

pcy190 opened this issue May 1, 2020 · 2 comments

Comments

@pcy190
Copy link

pcy190 commented May 1, 2020

I've tried to run the example of pinCTF in Windows10 x64

python37 pinCTF.py -f myexample.exe -i -l obj-intel64 -sl 28 -r abcdefghijklmnopqrstuvwxyz012345_-+LVMA -sk -t -tc 10 -ppin-3.13-98189-g60a6ef199-msvc-windows

It corrupts with

         The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.
    exec(code, run_globals)
  File "PinCTF\pinCTF.py", line 485, in <module>
    main()
  File "PinCTF\pinCTF.py", line 99, in main
    multi_core=int(args.threadCount))
  File "PinCTF\pinCTF.py", line 229, in pinLength
    m_pool = Pool(multi_core)
  File "F:\Python3\lib\multiprocessing\context.py", line 119, in Pool
    context=self.get_context())
  File "F:\Python3\lib\multiprocessing\pool.py", line 176, in __init__
    self._repopulate_pool()
  File "F:\Python3\lib\multiprocessing\pool.py", line 241, in _repopulate_pool
    w.start()
  File "F:\Python3\lib\multiprocessing\process.py", line 112, in start
    self._popen = self._Popen(self)
  File "F:\Python3\lib\multiprocessing\context.py", line 322, in _Popen
    return Popen(process_obj)
  File "F:\Python3\lib\multiprocessing\popen_spawn_win32.py", line 46, in __init__
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "F:\Python3\lib\multiprocessing\spawn.py", line 143, in get_preparation_data
    _check_not_importing_main()
  File "F:\Python3\lib\multiprocessing\spawn.py", line 136, in _check_not_importing_main
    is not going to be frozen to produce an executable.''')
RuntimeError:
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

seems the thread pool doesn't work well.

@pcy190
Copy link
Author

pcy190 commented May 1, 2020

As the inscount.so is hard coding in the readCount function, changing it to inscount.dll when identify the Windows environment seems a possible way to port to Windows.

@pcy190 pcy190 changed the title Corrupt in Windows [RFC ] Support Windows May 1, 2020
@ChrisTheCoolHut
Copy link
Owner

Pull requests welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants