Inject python with shedskin

83 views
Skip to first unread message

emanuel

unread,
Aug 29, 2012, 10:34:22 AM8/29/12
to shedskin...@googlegroups.com
I can use the shedskin to inject a python file in to a process?

Fahrzin Hemmati

unread,
Aug 29, 2012, 11:51:38 AM8/29/12
to shedskin...@googlegroups.com, emanuel
Please explain what you mean by inject?

On Wednesday, August 29, 2012 7:34:22 AM, emanuel wrote:
> I can use the shedskin to inject a python file in to a process?
>
> --
> You received this message because you are subscribed to the Google
> Groups "shedskin-discuss" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/shedskin-discuss/-/M2xtyx_-5wMJ.
> To post to this group, send email to shedskin...@googlegroups.com.
> To unsubscribe from this group, send email to
> shedskin-discu...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/shedskin-discuss?hl=en.

emanuel

unread,
Aug 29, 2012, 4:44:34 PM8/29/12
to shedskin...@googlegroups.com, emanuel
Like, i have a python file and i want that it run in an process, like abc.exe, i can sue the shedskin to inject the python in the process?

Joaquin Duo

unread,
Aug 29, 2012, 5:03:54 PM8/29/12
to shedskin...@googlegroups.com
Hi all!
I've been reading the list for a while but haven't posted.
I use shedskin regularly, great tool! :-D
I felt like I can answer this question.

On Wed, Aug 29, 2012 at 5:44 PM, emanuel <emanu...@hotmail.com> wrote:
Like, i have a python file and i want that it run in an process, like abc.exe, i can sue the shedskin to inject the python in the process?
Hi Emanuel!

I think you are missunderstanding Shedskin. Shedskin translates python into C++ (as as standalone app, or as a python module)
If you want to inject python code into a python process, then you can do it all in the python world. (sockets and exec or eval function)

If you want to inject binary code in a process, forget shedskin for a moment and just suppose you have C++ code:
You can:
- create a library and load it (.dll or .so)
- inject the code with some other less traditional way
(http://en.wikipedia.org/wiki/DLL_injection , there are more techniques, that's an example)

Now, since sheskin creates C++, you can do the above with your Shedskin generated code. (just take in count it uses boehm GC)

Cheers!
Joaquín
 

Quarta-feira, 29 de Agosto de 2012 16:51:40 UTC+1, Farz escreveu:
Please explain what you mean by inject?

On Wednesday, August 29, 2012 7:34:22 AM, emanuel wrote:
> I can use the shedskin to inject a python file in to a process?
>
> --
> You received this message because you are subscribed to the Google
> Groups "shedskin-discuss" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/shedskin-discuss/-/M2xtyx_-5wMJ.
> To post to this group, send email to shedskin...@googlegroups.com.
> To unsubscribe from this group, send email to
> shedskin-discu...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/shedskin-discuss?hl=en.

--
You received this message because you are subscribed to the Google Groups "shedskin-discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/shedskin-discuss/-/TzpjkBGCj7oJ.

emanuel

unread,
Aug 29, 2012, 9:19:43 PM8/29/12
to shedskin...@googlegroups.com
Ah, thanks :D
Reply all
Reply to author
Forward
0 new messages