Get hex code from x86 Assembly code on Python

By CAPSTONE/pydasm library, I can generate assemble code from hex code. but I want to assemble code(x86). not dissemble.

I want to get hex code from assemble code with code base. Is there any library to assemble on Python?

Answers


You probably need a compiler. I'm not aware of pure asm embedding but you could try to embed asm in C code, and embed C in python. To embed C in python you have few choices. Some of them are pyinline and cffi

UPDATE:

I've just found pycca which allows to embed asm.


Need Your Help

How can I map a Foreign Key in EF Code First Fluent when the column name does not match the parent table?

sql sql-server sql-server-2008 entity-framework entity-framework-4

I would like to do mapping using the Fluent API. I saw some other examples but these look different to what I want to do.

windowDidLoad() never called using storyboards for mac

xcode storyboard swift

I've just played around with the new mac storyboard-feature included in Xcode 6. I've set up a new OS X-project using storyboards and swift, then I've created a new file MainWindowController.swift,

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.