I need a linux bash script which send me an email if any results appear in searches made in the apache logs. I have a very simple method (sentence) to look into SQL Injection attacks, which simply searches for some keywords used in SQLi. Is this: So now I would like to be able to launch it in several access_l…
Tag: linux
Use a modified variable in bash script, trying to change git branch programatically
I’m playing around with my custom commands, and I’m currently trying to change a remote Git branch programatically using bash. The idea is this function will try to find the branch issue_X, if it does it switches, otherwise it creates and sets the remote origin. The problem is git branch -u origin…
Is there a way to retrieve the script path called by a user-defined command?
I’m a newbie in GNU/Linux and, for a project, I need to do some reverse engineering. At a given line in a script, there is a command: I’m almost sure the “dc” command was previously added to the path/simlink/(?) by a previous developper. When executed, the command allows to run a simul…
Use tar to archive the contents of your home directory in linux
I am trying to archive the contents of my home directory using tar and then compress the tar file with gzip. I know you can uncompress and unarchive the .tar.gz file using cat, tar and gzip. But , I don’t know how to compress and archive. Answer Hey there here is a link for your question. a full guide h…
Grep for String and open at the corresponding line
I’m having several occurrences of a specific string over several files in several lines obtained with grep. I’d like to open these files sequencially on the corresponding lines. I tried to do it with vim, but so far no success when it comes to open the line. Mustn’t be vim or grep, but IR…
389 Directory server testing with lib389
I am testing 389 Directory server testing with lib389. I am following the bellow link. https://fedorapeople.org/~spichugi/html/guidelines.html#add-modify-and-delete-operations What is the meaning of “standalone” here? Answer Its the name of ldap server instance:
Automate make execution with variable parameter
Here “SEED” means a random number: I will run the target test1 in terminal likewise. But the problem is here I want to run that target 10 times by using any conditional loops. If i want to run the test1 2nd time again I need to give like this: 3rd time: 4th time: Likewise, each and every time I ne…
Remove lines are between two line numbers (or patterns) with sed [no duplicate]
I saw and read many topics about my problem, but they didn’t help me. a close topic to my problem but it didn’t help me: removing lines between two patterns (not inclusive) with sed Question: I have a text file and I want to remove lines are between two patterns. note1: between these patterns, i d…
Compilation with glibc 2.7 include path fails
I have compiled on my SLES 12.3 g++ 7.3 into the /FaF directory and glibc 2.27 is installed into the /FaF/glibc directory. Compiling this very simple program with g++ -c testAbs.cpp -I /FaF/glibc/include fails horribly: See the long error list. Below I inserted the first 15 lines – in total there are mo…
Changing Kafka Host name entry in zookeeper and persisting it across storm topology restart
Background 6 node Kafka Cluster 3 node Zookeeper Cluster 3 node Nimbus Cluster Apache Storm Worker hosts dynamically adjusted using amazon spot fleet Scenario For a particular topology for a given partition it subscribes to, the Zookeeper entry looks as follows {“topology”:{“id”:”…