Create a linux script (perl, awk, sed etc) that searches multiple files for a matching start and end string
$30-250 USD
Completed
Posted over 8 years ago
$30-250 USD
Paid on delivery
I need a script writing that searches through all the files in a directory (including subfolders), looking for a certain string, for example "/*70ff608051e68d9ee3280c699f82f8b1*/".
When a matching file is found, the file will likely contain this string twice, acting as a START and an END tag, with text inside.
The matching file should be cleansed of the START, INSIDE TEXT and END tags.
Typically these will all be JS and PHP files.
I have attached a ZIP of a reference file that would match the above string. Warning, this file is infected with malware - hence our reason for wanting to search through directories to try and clean them all.
All the other code in the files should remain present, so just everything in between and including the start and end tags should be removed.
Any script that can be run via linux command line easily will suffice. We need to pass in the start and end string each time though, as this may be different each time.
Thanks.
Hello.
I had job in hosting comopany before.
We used this script for clean server from malware.
I checked and it is working 100%.
find . -type f -name "*.js" | xargs grep -l '70ff608051e68d9ee3280'| xargs perl -pi [login to view URL] -e "s/\/\*70ff608051e68d9ee3280c699f82f8b1\*\/.*//g"
$30 USD in 1 day
4.9 (731 reviews)
7.3
7.3
22 freelancers are bidding on average $63 USD for this job
I'm one of the best Perl developers here and I can complete your task in less than a hour.
All I need to start is milestone payment from you. You'll release it after you check everything on your side.
Thanks.
Roman
Hello,
How are you? Hope you are doing well.
I have read your project description and the issue may be and understood.
sample would be as follows
#! /bin/bash
string=$1
path="/tmp/test"
You have to pay only 40$ for this project and need to pay upon your satisfaction after the work has been completed. 100% customer satisfaction is our Moto. Most of the tasks will be completed within an hour or two.
We are professional server administrators having strong knowledge in the field of UNIX/LINUX and Windows.
If you are willing to handover this project to me, you will get future support for all issues from our team.
Hi there.. :)
Well I believe your files have been infected with some malicious codes right? I have done exactly the same for a site of my own and for many other clients..
I would love to write a shell script for you if it's alright. It'll do exactly as you ask for.
Let's do this please. :)
Best
Kashif
Hi mate how are you? I did this few weeks ago for a client to delete the malware parts of php files for him so i can do this easily for you and you can run it against your intended files to clean them all of malwares. please let me know if you want me to do this for you.
hello, sir:
c/c++/python expert worked for samsung & huawei
a sample can be provided before hired.
i checked you js file , and have done python sample on linux , it works
hope to get message from u
ty
Hi there,
I'm a Linux sysadmin with 14 years of experience managing Linux servers and would love to help you with this project.
I think this task can be done in bash (using find, egrep, awk and sed). I've done similar scripts in the past. My suggestion is that we also copy te infected files for another directory (for later analysis), before we clean the undesired content.
Looking forward to hearing from you.
Best regards,
Marco Ramos