I am interested in intercepting all system calls related to the file system and instead having my own code run. For example, calls to creat, write, close, lseek, getcwd, etc. My goal is to create a function like execve that captures all file I/O from the spawned program to an in memory filesystem managed by t…
Tag: linux
Get file from ubuntu server
I have an Ubuntu server running with DB backups. How to get the backups? I am using a *.pem file to login. I have been trying mail with mailx. I execute the command but without success. I get no error messages I am aware of that this is without attachments. How to get this working? With wget do I need
Is there any way I can use ‘nmap’ port scanner, to generate and output result on my Django App
I’m trying to create some network app in Django, and what I would like to ask: Is it possible to do something like this: Client type IP address, than server scans it with ‘nmap’, after that the result passed to the Django app, and than I do whole bunch of stuff with it. Just want to know is …
error in clone system call sentence in c++
I am trying to to run c code in c++ which uses clone inside , I got an error which I couldn’t solve it , anyone used clone in c++ before , and can help . my code: and i got the errors: dell@ubuntu:~$ g++ n.cpp -o n n.cpp: In function ‘int main()’: n.cpp:40:62: error: invalid conversion from ‘int ()()’…
what does $* mean in a shell script
What does $* exactly mean in a shell script? For example consider the following code snippet Answer It means all the arguments passed to the script or function, split by word. It is usually wrong and should be replaced by “$@”, which separates the arguments properly.
Reading username and password from file
I’m looking at a away of reading the username and password of a file and inputing those to either add user or delete user. EG: I have a file named ‘userlist’ with the following content with this format: What I don’t understand completely is how to use BASH script to add these accounts.…
java application and x11 forwarding
I need to start jperf on virtual server. I configured X11 forwarding via ssh. xclock – is working. But if I start jperf I get: user@client-32:~/sandbox/jperf-2.0.2$ sh jperf.sh Exception in thread “main” java.lang.ExceptionInInitializerError Caused by: java.awt.HeadlessException at sun.java2…
How to recover after deleting the symbolic link libc.so.6?
In our server the symbolic link to libc.so.6 has been deleted. Now none of the binaries in the system work. To fix this, I tried: which, as expected, gives me: I also tried: with the same result. Further unsuccessful attempts include cp, mv, cat. I’m connected via ssh and I believe I will not be able to…
how to generic .htaccess to prevent hotlink
The following code works fine: but I want to make a generic script serve me for several sites I manage, but fails try to get Answer You can’t use variables inside the regex. You can work around this by using a RegEx backreference like so: (note the # is just used as a boundry. It could be any character …
/dev/mem and /dev/kmem not exists?
I would appreciate if some one can explain me why the two files do not exist? How Android kernel’s virtual memory space and physical space be like without have the 2 files? Edit: I am having Android 2.3.7 (Cyanogen mod), the 2 files do not exist: Edit2: I have checked the Samsung Galaxy S3 running ICS, …