executable

Python - create an EXE that runs code as written, not as it was when compiled

梦想的初衷 提交于 2019-12-17 12:40:35
问题 I'm making a pygame program that is designed to be modular. I am building an exe with pygame2exe of the file main.py, which basically just imports the real main game and runs it. What I'm hoping for is a sort of launcher that will execute Python scripts from an EXE, rather than a single program containing all immutable files. What is the best way to go about this? I've tried using imp to dynamically import all modules at runtime instead of implicitly importing them, but that seems to break

How to disassemble a binary executable in Linux to get the assembly code?

拜拜、爱过 提交于 2019-12-17 08:12:23
问题 I was told to use a disassembler. Does gcc have anything built in? What is the easiest way to do this? 回答1: I don't think gcc has a flag for it, since it's primarily a compiler, but another of the GNU development tools does. objdump takes a -d / --disassemble flag: $ objdump -d /path/to/binary The disassembly looks like this: 080483b4 <main>: 80483b4: 8d 4c 24 04 lea 0x4(%esp),%ecx 80483b8: 83 e4 f0 and $0xfffffff0,%esp 80483bb: ff 71 fc pushl -0x4(%ecx) 80483be: 55 push %ebp 80483bf: 89 e5

How do I make this file.sh executable via double click?

随声附和 提交于 2019-12-17 08:00:07
问题 First off I'm using Mac. Next, I need to execute this "file.sh" we will call it. Everytime I need to execute it I have to open Terminal and type: cd /Users/Jacob/Documents/folderWithFileInIt bash file.sh This is okay, but I feel like it would be a lot quicker if I make the file execute on double click, don't you think? So my question is, how do I make this file executable via double click? My ideas were either: a) type something like chmod into terminal and change permissions? b) make a file,

What is the smallest possible Windows (PE) executable?

耗尽温柔 提交于 2019-12-17 06:30:31
问题 As a precursor to writing a compiler I'm trying to understand the Windows (32-bit) Portable Executable format. In particular I'd like to see an example of a bare-bones executable which does nothing except load correctly, run and exit. I've tried writing and compiling a simple C main function which does nothing but the resulting .exe is ~22KB and contains many imports from KERNEL32.DLL (presumably used by LIBC to set up environment, heaps etc.). Even the DOS Header could probably be smaller

make your Jar not to be decompiled

怎甘沉沦 提交于 2019-12-17 06:16:10
问题 How can I package my Java application into an executable jar that cannot be decompiled (for example , by Jadclipse)? 回答1: You can't. If the JRE can run it, an application can de-compile it. The best you can hope for is to make it very hard to read (replace all symbols with combinations of 'l' and '1' and 'O' and '0', put in lots of useless code and so on). You'd be surprised how unreadable you can make code, even with a relatively dumb translation tool. This is called obfuscation and, while

Getting around Chrome's Malicious File Warning

谁都会走 提交于 2019-12-17 03:24:11
问题 I created an application which comprises a number of *.exe files. I've packaged these up into an NSIS installer which I hosted on my website. When I try to download it Chrome reports it as potentially malicious. At first I thought it could be the URL/site I was hosting on not being recognized so I signed up for Amazon S3 storage and moved the file there. Same problem. I then thought that packing the executables might cause this, so I tried without. Same issue. After some more reading I

Running an outside program (executable) in Python?

旧城冷巷雨未停 提交于 2019-12-17 02:42:29
问题 I just started working on Python, and I have been trying to run an outside executable from Python. I have an executable for a program written in Fortran. Let’s say the name for the executable is flow.exe. And my executable is located in C:\Documents and Settings\flow_model . I tried both os.system and popen commands, but so far I couldn't make it work. The following code seems like it opens the command window, but it wouldn't execute the model. # Import system modules import sys, string, os,

How to make python package refer to packaged, non-python executable (.exe); Windows

﹥>﹥吖頭↗ 提交于 2019-12-14 04:22:09
问题 I am putting together a Python package that uses a Cygwin executable without having Cygwin installed. This means that I have an executable ( .exe ) file and a library ( .dll ) file inside my package. I am doing this so that the tool can be used on Windows by people who only use Windows and Python. I am new to Python packages, so I appreciate any help. The Main Question How do I make my package point to the executable file inside my package? This would be used, for example, instead of the

How to use buildapp with a pre-defined asd file

早过忘川 提交于 2019-12-14 01:36:03
问题 I intend to use buildapp for getting executables out of my lisp-code, but I do not understand how I can specify my .asd file for the project, for loading up the code. I imagined some call like: buildapp --asdf-file:/path/to/projectasdffile.asd \ --entry-point package:main But the examples provided by the homepage do not cover a call I recognize as equal, all the example calls look like a whole asdf definition itself. This would be a bit big for a whole project, especially as I already got a

Creating a batch file, for simple javac and java command execution

孤人 提交于 2019-12-14 00:19:37
问题 It is a really simple thing but I cannot get my head around it. I have looked at plenty of StackOverFlow post and as well as on internet. My goal is to create a .bat which will open cmd and execute my Main.java into command prompt. Easy isn't it, but I have got confused about how? Below I am writing steps which my batch file should perform open cmd javac Main.java java Main My file will reside next to all my .java so I am assuming I don't need to give explicit path. My understanding so far by