Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
How do anti-virus programs detect if something is a virus or trojan?
I'm from Turkey, please keep the English simple if possible, thanks.
There are three basic ways to find viruses. You can scan files to see if they have virus code in them from known viruses. You can scan files to see if the code will do virus-like things. You can wait until a program does something it should not do, and flag the program as infected.
You would scan files when they are first created, and you would also do it on a schedule after that. You would have to install a kernel driver in order to watch what programs do and stop them from doing malicious things.
Many anti-spyware programs work exactly the same way. For example, Spybot S&D can watch for Registry changes that could be spyware installations.
There are different types of virus detection. Some of the different techniques they use are
1) Look at binary makeup of file for match or partial match in database of known viruses and trojans (most common technique)
2) Watch what program does and see if it ever does anything similar to viruses/trojans
3) Analyze program code (sometimes disassemble program code) and look for malicious things. This is often very difficult and usually only advanced detection programs do this.
Signature-based detection - detects by comparing a virus signature ( a binary pattern of known viruses) against files being scanned.
Heuristic-based detection - detects behavior in and patterns of code that indicates a virus may be present. Suspicious Code is ran in a runtime virtual environment to further test for virus behavior. This can find new viruses not in the virus definitions.
Behavioural-based detection - Detects viruses when they are run based on the behavior the virus exhibits
Sandbox detection - similar to behavior based, this method Executes a potential virus in a runtime environment and monitors behavior
Here's a more complete reading
They use signatures, or definitions of what a virus looks like, and compares them to files it scans.
See this article from SciAm for a good explanation.
Antiviruses find viruses by watching the registry, looking at a program's code, looking at it's list of common viruses, or even looking on the internet to see if other people/software have classified it as a virus.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I release a bunch of tools for free, but recently I have began to sell an application, that has private research, and people have been able to get my source code, and one person publically released my entire source. I spent a lot of time on this program, just to have someone crack it, and release my entire source.
How can I go about protecting my program? I have tried HWID, but people are still able to crack it. I know I am limited by C#, but it the most convenient to use. I just need a way to protect my programs from people trying to do this.
You could have a look at the many obfuscation tools that are out there, for example these:
http://gapotchenko.com/eazfuscator.net
http://orangeheap.blogspot.nl
http://confuser.codeplex.com (succeeded by https://yck1509.github.io/ConfuserEx/ and then again by https://github.com/XenocodeRCE/neo-ConfuserEx)
http://ntoolbox.com)
Well, the problem with languages like C#/Java is that they are generally much easier to de-obfuscate. The way to secure this is generally to put this stuff into a webservice, but you said you couldn't really do that. What about porting specific non-trivial functions over to a language like C, and obfuscate that. Your C# program could then use reflection to make calls to this external/unmanaged dll. It would increase the difficulty for de-obfuscating, but the problem is that if someone wants it bad enough, they can figure it out as it is client-side.
It may be that legal action is the only real solution here, but this is not a site for legal advice, and I am not qualified to give it if it were.
Additionally, this could be a business decision. Consider Making your software open-source and post a donation link. I am also not qualified to give business advice, but this is worth considering. It may actually increase your revenue, not to mention the other benefits that come with releasing open-source software.
There's Dotfuscator (http://www.preemptive.com/products/dotfuscator/overview). But the best solution in some cases is to offer what you do as a web site (Software as a Service).
Consider this tool for example to convert VB to C#: http://converter.telerik.com/
Or this tool to format JSON: http://jsonformatter.curiousconcept.com/
This may or may not work for you. I don't know what the nature of the software you're trying to protect is.
No, your code needs to contain the information needed to decrypt itself, its an impossible problem to solve.
Your best solution is to put your intellectual property on a server in the cloud that only you have access to. Give your customers a unique login, audit their access to check for abuse, off load as much grunt work onto your customers machines, but keep your algorithms locked into the cloud.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
In any operating system, which programming language is the most oriented to perform actions, such as:
Delete files from the computer
Add files to the computer
Unzip files automatically
Having many files like 01file.jpg - 02file.jpg, rename them all automatically using regular expressions (this point is very important to me)
And many things like that, which include automating actions that are regularly very tedious to perform.
I do not need the most "appropriate" language, but the one that is generally used for these purposes.
Choice of programming language is obviously a combination of technical factors and personal tastes. However, there are many strengths to Python for doing the tasks you mention in a way that is very portable between different operating systems. The "os" module contains lots of functions for adding/removing files and directories, renaming files, etc. Similarly, the regexp module allows replacing chunks of strings using regular expressions. As for zipfiles, there's a module for that too.
Any language can do these things really, so pick one that you’d want to learn. Python comes by default with lots of libraries, I believe including zip file manipulation, so it may be easier to get going.
From your question, I've inferred that you are looking for a language that is portable and easy to use with low friction in order to perform the operations that you mentioned.
If you mostly work with UNIX-based systems such as macOS and Linux, then shell programming might be a good option, especially considering the basic tasks you require.
The advantages of using the shell is that it's very well suited for the tasks you mention, you can easily alternate between automating your tasks with a shell script or just issuing commands as needed. The syntax can be a little bit surprising for beginners, but for your purposes, you wouldn't need to learn much.
The disadvantages are that there can be small but subtle differences between Operating Systems between commands, so you would need to know about these differences if working on these different platforms was important to you. Also, while you could get a shell like bash to work on Windows, it's nowhere near as convenient as on a UNIX-based OS.
If cross-platform compatibility was very important to you, then using a higher level general-purpose language like Python might be a good option. It has the advantage of being mostly consistent across platforms and abstracting away the differences.
The disadvantage there is that you might need to install Python depending on the platform that you have and you would lose a little bit of the interactivity and flexibility that the shell provides you with. On a UNIX-based machine, you're pretty much in a shell as soon as you fire up your terminal and ready to issue commands, so there is very little friction.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Recently I trying to learn Ladder Logic programming for PLCs, but I want to know if there is any IDE to create Ladder programs better that Step7 or cx-programmer? Is there any plugin for Visual Studio or Netbeans that I can use? Finally, is it better to work with PLCs under Linux or Microsoft Windows?
UPDATE 1 : After googling about this, I found out that Ladder programming is not depend on the PLC brand or its model, so I did not mentioned any brand in my question.
What is your goal? In almost all cases, your IDE is dictated by the PLC manufacturer, and your PLC brand is spec'd by the customer when they buy the machine. They spec the PLC because they need to have something that they can go online with for maintenance and troubleshooting. Since the software is proprietary and absurdly expensive, they don't want to get a new software license for every machine in the plant and have to relearn new software, while they are bleeding money of manufacturing downtime.
So if your goal is to enter the industry, you want to find out what plants in country tend to use. In North America it's usually Allen-Bradley a.k.a Rockwell Automation, which is programmed with RSLogix 5000 (edit: the recent versions of RSLogix 5000 have been rebranded as Studio 5000). In Europe, it's typically Seimens, but I have no experience with them.
PLC IDEs are almost always picked hardware first. With some obscure exceptions, you pick the hardware you want to run, and this determines the IDE. The IDEs are all proprietary and unique to each hardware platform. Rockwell Automation alone has three different IDEs to support their hardware lines, all licensed individually and very expensive.
If Omron is the most common in your area, it's a good idea to start with them. Once you get used to one type of PLC, learning more is really easy.
If you don't mind which PLC platform you're using, I really enjoyed my time with RSLogix. They have a free, training-level suite available here:
http://www.ab.com/linked/programmablecontrol/plc/micrologix/downloads.html
I prefer RSLogix 5000. It's one of the easiest to work with and has User Defined Types and Add On Instructions to help with reusability.
ABB has Control Builder (which is the product that I work on), AFAIK when somebody buys our AC800 controller they get the CB for free, at least the so called "Compact version" which is file based. The CB has ladder diagrams as well as all other 1131 languages plus some extensions like Function Diagrams.
Disclaimer Sorry if it sounded like an ad, just very passionate with what I work on.
I am primarily a high level language programmer, but have also done development on various PLC /PAC platforms, including Rockwell, Siemens, and Beckhoff.
If your goal is to merely get an introduction to ladder, nearly anything will due. You can download Beckhoffs TwinCAT software for free. It is only a 30-day license, but you can just continually reinstall every 30 days without issue. The great part of TwinCAT is that it runs on a Windows PC, so you can develop and test code directly on the PC and don't need actual Beckhoff hardware to play with. The ladder is a bit quirky, but the statement list portion is by far one of the more powerful. If you are a C-programmer you will feel very comfortable with Beckhoff, because they have duplicated a lot of C-like functions (e.g. memcpy and setcpy) into their libraries.
The Beckhoff platform is not all that widespread, but it would allow you to learn the principals of ladder and PLC/PAC programming.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I took a class this spring about generic operating system theories and principles, and now I'd like to spend the summer working through Tanenbaum's Operating Systems book, looking through Minix source, and getting a general idea of actual OS implementation.
There are two OS professors at school and I went to them to ask about borrow Tanenbaum's book. Interestingly, one said I should use the older, second version of the book, and focus on Minix 2 because it's overall simpler and has less source to understand (and thus would be easier to learn from without information overload). The other prof said she didn't think this would be a problem, and that I should go with Minix 3 and the newest edition of his book so that I get to see a more modern implementation.
What does Stack Overflow think? Anyone here have experiences with both versions of Minix? I would like to learn the principles of making an actual OS, but I also don't want massive information overload that will keep me from actually understanding what the code as a whole is up to.
I took Minix 2 way. It was understandable and paved way for Minix 3.
About HelenOS - they take unrealistic goals - bug free and formal description. Both are not achievable.
HtH
If you want to go deep into sources of microkernel-based OS I would suggest you to have a look on HelenOS, a newer but still relatively simple operating system not burdened with UNIX semantics and API. Alas, there is no book (as the Tanenbaum) about it yet, but the sources are well documented.
Interesting I just come across this old post so sorry for what seems to be a bump.
When I was at university, sometime ago, we had an operating systems lab we used PC's with Linux for the development and 68000 based machines with boot roms for the testing I believe they were VMS based.
The software environment was either Modula2 (the first and second year language) or C/C++ (second and third year language) everything was cross complied and loaded via script ready for the test machine to be reset to boot the new OS.
Anyway to cut this short, we used some sort of educational framework which was using the Minix2 sources so you could write parts of the OS for a project without having to write the whole lot.
I have been trying to find the official sources and documentation for this environment for sometime, I am sure it's on the web somewhere and possibly updated/maintained.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
My team is tasked with implementing Unicode in our software, which is well over a million lines of code. We support an MFC Client and a Server on Windows, AIX or Solaris with an Oracle or SQL Server database. ICU looks like a very helpful tool. What are the pros and cons of using ICU? Does ICU work as advertised without major bugs?
A data point: Our (yes, that's a disclaimer) list of users and bugs is all on our project site.
IMBO (biased):
Pros:
works as advertised, comprehensive.
Mature: 10+ years now, with a good stability policy and very active development.
Uses latest Unicode+CLDR+BCP47+other standards.
Compiles basically everywhere. C/C++/J and called by/implements python,perl,php,…
Open source, with an increasing diversity of contributors.
Comes with all needed data for the above (see below, under cons), yet customizable. (can add custom data)
Cons:
Needs better documentation (we try- anyone want to help?).
Lots of APIs- "it's too big #1" hard to know which one to use, even if it does what you want.
Used by lots of types of programs, from embedded devices, smartphones through major desktop apps through databases and operating systems and enterprise apps: So, there may be multiple ways to do something.
Comes with all needed data for the above! "it's too big #2" (see above, under pros), yet customizable. (can be trimmed down to size)
ICU is terrible: avoid if at all possible.
Despite its age, basic things in it are broken, for example in this question: Fixing regex to work around ICU/RegexKitLite bug
Time handling is broken as times are underspecified: you can't distinguish a DST from a non-DST time in a reliable way in many APIs.
It's freaking huge.
The documentation needs a lot of work. Less-used features are often unusable because there's no way to figure out the right way to use them. I spent days trying to get transliteration to work as explained and eventually gave up.
It likes to work in UTF-16, the worst of all possible worlds.
Support is unresponsive to problems.
In my experience, it's not until you're most of the way through a project that you begin to discover the insidious flaws that will take 90% of your time.
For many people, there is no alternative so you're stuck with it.