Skip to content

[RFC ] Support Windows #15

@pcy190

Description

@pcy190

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions