Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Failure scenarios are complex and the potential responses of a multi layer complex application (or even a set of applications) requires hard thinking and complex understanding as well as complex implementations.
To ease the pain todays servers have power supplies being able to be programmatically switched off and on again to force an instant dead of the server and an instant reboot. This is referred to shooting a server in the head or putting a bullet in/through the head of the server.
Since todays server are usually virtual and sometimes the server is not equipt with power control or programmatically accessable kill switches, crashing the OS is the best option.
So how can one do this?
I need a solution in a very narrow timeframe (like 1000ns) and does not send kill signals or give any part of the OS time to even act and most importantly not to recover.
According to this blog you can do following:
echo 1 > /proc/sys/kernel/sysrq
echo b > /proc/sysrq-trigger
To enable it you probably need to put following in sysctl.conf:
kernel.sysrq = 1
This should more or less act in the same way as pressing reset button on the machine.
I don't get it, if you're looking for a reboot in general then the command to go for is:
sudo reboot
Related
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 1 year ago.
Improve this question
I want the user to be able to write their own math functions in my program. And these functions could possibly be shared with someone else, and run natively on their machine. Algebra is Turing complete. Does it mean I should warn users of my program about potential danger of running math? Sorry if this is a silly question :)
Edit:
I am making a simple diary, but the entries have dynamically calculated properties. I am thinking of using bc for running the user defined functions. It's rather easy to fix things for user if the expression does not end since they can modify the expression outside of the program. But let's say user A sends user B their diary. Should I warn user B that it's not safe to open their diary?
For example, you can have a Turing-complete language with recursion, but limit the stack size and run time (to kill the busy beavers) for each user script. If it's implemented as some kind of a VM it'll be very easy to do. You can also have a total functional language to ensure termination (but that won't solve the busy beavers problem).
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have a program that prompts for a PIN before performing particular actions. The PIN is stored, encrypted, in a local config file along side the executable binary. User enters PIN, program decrypts and compares to the stored value, if they are equal, ok, if not etc.
I'm aware this kind of security check could potentially be circumvented with forensic tools that alter the binary, in affect, changing the '==' to '!=' in the right place to make all the wrong PIN's pass the test in my example.
This may be a stupid question, as I know from the first 2 minutes of googling it's a big and challenging topic, but I still thought I should start with checking on features of the language/compiler I'm actually using first. So, are there any features natively available with Go to make this kind of attack harder to successfully perform?
No, there is nothing remotely like this in the official go compiler or standard library.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I'd like to write some library/app to interact with Galaxy Buds.
I assume that this would require me to somehow sniff packages it sends to my mobile telephone and get which corresponds to what command(volume/pause/play) and so on. And then write some wrapper for it? I'd like to make this app/library reusable between different Linux distros, and not-that-hard-portable to Mac OS.
Knowing all that I still in the place where I'm not sure where to start from.
I'd appreciate suggestions to any part of this process e.g (Programming language selection, software for BT sniffing ...)
I do have some experience with C#/Java/C++, but I'm willing to learn if these aren't most suitable for solving the issue.
I don't know that much about the libraries needed for such a solution, but as far as sniffing is concerned, I know that Wireshark (WireShark_Bluetooth_Sniffing) is a good starting place.Once you isolate the touch commands, I assume you can map them to media commands, as described here: D-Bus_Media_Commands
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
Can you give several indications (pro and cons) concerning the fact to put the menus of a web application inside the database?
Mainly it depends upon your requirement of your application. Its not always a good approach to bring a drill machine to make hole in sand. Every approach has some limitations and need more efforts if you do apply some alternate approaches.
In cons you can consider
Performance ( to prepare dynamic menu every time you load the master page also the static text less time to process in compare to dynamic)
Configuration will be always an issue while adding or modifying the menu
(Always need a database guy at the time of any change)
Pros
Highly configurable and completely dynamic
Can add/remove the attribute and change the text without affecting anything in code.
We have some solutions also to overcome from the cons
In case of performance we can use caching but everytime the menu change you need to recycle the application pool.
For configuration you can provide a page to control the menu content. (No Sql guy needed)
So as I said earlier you can go either way as your application adopt easily and in much better way.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I've often seen tech tutorials in which I'm supposed to open a terminal per program/process where actually I feel no need for doing so (no output on terminals, no termination via terminal etc.), and instead I can run all programs background with & at the end. Is there still advantages / technical reasons for using multiple terminals?
(not versatile at all but an example is this tutorial)
It is probably largely because it's easier to explain that than it is to explain how to start a program in the background. A part may also be that instructions use something like "export X=something" and they don't want to cause problems for another process later on, that may not behave as expected from this.
But generally, you can just use one terminal window, or one terminal with several tabs, if you prefer that solution. Different people have different ideas of "the right way to do things" - as long as it works as expected and every time, it's not a huge issue which way you do it.
Aside from envirnonment variables, I don't see any technical reason to have multiple terminals.
commands that you run on the terminal will use the same terminal (stdout) to flush info/warning or error messages. You can run all those commands in background if you want, like you said using & but then it gets difficult to keep track of any messages that those programs may produce. everything will be displayed on same console.