node script to executable file - node.js

is there any way to convert a node script into a kind of executable or package for linux?
For example for sharing a script I don't want to give the source code, just an executable
Any help is welcome
Regards

The only thing you'll be able to do along the lines of protecting code is to obfuscate the code, which makes it harder to read.
Free Javascript Obfuscator
However anyone with enough patience and time will still be able to reverse engineer the code.

Related

NSIS - Compile with opcode re arranged to prevent access to source code

I am trying to reduce and make as difficult as possible the ability to access my source code after being compiled by NSIS. I have read that the only way to reduce the chance of unzipping is to modify the order of the opcodes in the Source\fileform.h from the source code and then Compile the new version.
This is a bit over my head. I was wondering if anyone has done this before and willing to post one they have done. (Or create one for me?)
Main reason for this is I have info that I encrypt using blow-fish within NSIS and do not want the chance oFf someone finding out what the encryption keys are. (Used for licencing the software) I understand noting is fool proof, but just want it as difficult as possible.
I know its asking a lot, but could really this.
Thanks!
I don't believe there are any publicly available modified builds like that. And if there were and it got popular, the decompilers would just add support for it.
I have a complete step-by-step guide to building NSIS here.
If you know C/C++, Delphi or C# you could build your own private NSIS plug-in that handles the encryption details.
No matter what you do, somebody who knows how to use a debugger can easily set a breakpoint on the blow-fish plug-in and view your key. The only way around that is a custom plug-in or an external application that handles the cryptography internally...

Is it OK to modify the default location for Python-3.6.0.exe to just the C drive?

I am a 65 year old "newbie" and generally use default options when downloading. Python.org wants to download to an obscure directory such as
C:\Users\Facdev\AppData\Local\Programs\Python\Python36-32".
Is there anything wrong with downloading instead to "C:"?
This should not pose a problem, as long as the directory is specified correctly in you PATH.
It is OK to modify the location where you will download and install Python. However, I would advise against doing so if you are unfamiliar with how system environment variables and PATH locations work in Windows.
Why does it matter?
Once you have the python executable (in your case Python-3.6.0.exe) on your system, your computer needs to know where it is in order to execute it! If you place the executable in a location like the main directory on the C: drive your computer does not care. Your computer also does not care if the executable is deep down in the AppData\ directory.
By changing the default behavior you run a risk when troubleshooting unexpected behavior that instructions will not be written for your situation. This is OK as long as you understand what you will need to change in order to apply the troubleshooting techniques listed on documentation, blog posts, and forums.
Because of those factors and this being a new process for you, I recommend sticking to the default. You can change the location later, once you understand what doing so means. Learning to program can be frustrating and trying to grasp managing the software environment only adds to the frustration. Tackle that issue later.
Good luck on your new adventure! I hope you learn to enjoy writing your own programs in python!

Why can't we extract source code from executable file?

I need some information on executable files, thanks in advance, this is a new topic in our grade.
I've seen a lot of questions asking how to extract, but my question is why can't we get the original source code? Yeah using decompilers we can extract but those codes are not the exact code used to develop the program.
I mean, if a computer is running a software it obviously has to have some code to refer from, then why can't we get that code? Also, do exe files have the same code which is developed by the programmer? Is it that OSs are developed in such a way that they don't leak source code from an executable file?
The .exe file is made up of binary numbers which consist of 1's and 0's. And these files contain some additional code that support code from many source.
Operating systems use binary languages to operate, this is what we call machine code. (Getting the code back from the exe is like getting the apple back from the apple juice) ;)
Also check Compiled vs. Interpreted Languages
The process to transform the source code into the exe file is extremely complex. For example, when it is being compile, the language of the source code (eg. c++ etc) is transformed into machine code. It is like when you eat something, those things turns into feces after being process by your stomach. Therefore it's quite impossible to revert exe file to source code.

Easy and quick way to jump into node.js library from command line?

I'm trying build up good habits and a robust understanding of node/javascript.
Great answers to questions often come from Stackoverflow-ers who have taken time to look closely at the source code. (No surprise there, right?)
So, I'm getting myself into the habit of always checking out the underlying source code (cavaet - just javascript source code now, maybe C in the future).
Is there way from the command line (or with Node) to jump to the source-code of some object you are using? That is quickly go to the right file and line here:
https://github.com/joyent/node/tree/master/lib
Any tips or built-in tools in Node.js I should check out?
Thank you.
I often just do a console.log(object.method.toString()); which simply prints the text of the function out, which is often good enough to learn about it.

how to encrypt a vc++ project?

i have been programing in vc++ for sometime and i want to make some free software for people to use but i really don't want people to have a unprotected copy of my work. i just use what ever vc++ 2008 has when i build in right now so i don't know if it is encrypted or now. i don't need something that is top of the line i was just hopeing for something free and it would encrypt my project before i gave it out.
You need to start by thinking about what you want people to be able to do with your code, and what you want people not to be able to do. If all you want is that people can run your code, but can't change it (without significant difficulty) and can't see how you're doing what you're doing, then you can simply compile the program with your compiler, and send them the executable code. This is the way in which much commercial, paid-for software is distributed: as an example, if you buy a copy of Microsoft Word, you get an executable program which you can install on your machine and run, but you don't get the source code from which it was built. This means that you can't make changes to Word if you want to fix a problem or change the way in which it works.
If what you want it more complicated than this, please tell us what you want various people to be able to do and not do, and we'll try to help.
Well, "free software" can mean one of two things- free as in beer or free as in freedom. It sounds like you're looking for the first of the two.
I'd say don't bother with encrypting it. If you're distributing a compiled program, there's really no way to prevent someone from reverse engineering it if they wanted to... which is unlikely if your program is free anyway. Same goes if you're distributing the source. Encrypt it all you like, but all it takes is one person with a decrypted copy to redistribute it.
no one is going to use any 3rd party library if it can't be maintainable/debugable(because you don't want to provide source code)
its like installing unknown program on your computer... you never know that's gonna happen
if you really want to release it, then you might split it and release it in parts?
or maybe someone is already doing something like you.. check github for example
i don't really get what you want, maybe you just want to encrypt your project files?
if you want to encrypt it with free software why don't just compress and put password, for example you can use 7-zip, the encryption is AES-256 bit which is really good, no one can break it, except maybe NSA.

Resources