Sponsored Content
Top Forums Shell Programming and Scripting how to remove hacking code from multiple files Post 302710397 by Corona688 on Thursday 4th of October 2012 11:26:21 AM
Old 10-04-2012
If there was an easy magic do-everything fix for you, we'd give it to you so you could get it fixed and stop insulting us.

It's not "opinion". I've dealt with this before. These kind of malware infections are designed to be difficult to detect and remove. When I ran into a situation like this where the customer had no backups, I wrestled with it for days, but removing the bad parts kept breaking the pages, and it made efforts to put itself back that made everything worse than when I started. I eventually had to track down the original .zip files for the software -- thank goodness the internet is huge, some data-packrat somewhere or other is likely to have anything -- replace everything with a .php extension, and remove everything else newer than 90 days old.

Then afterwards, I secured the permissions properly so it wouldn't happen again...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

read list of filenames from text file and remove these files in multiple directories

I have a large list of filenames from an Excel sheet, which I then translate into a simple text file. I'd like to use this list, which contains various file extensions , to archive these files and then remove them recursively through multiple directories and subdirectories. So far, it looks like... (5 Replies)
Discussion started by: fxvisions
5 Replies

2. Shell Programming and Scripting

How to remove certain lines in multiple txt files?

Hi , I have this type of files:- BGH.28OCT2008.00000001.433155.001 BGH.28OCT2008.00000002.1552361.001 BGH.28OCT2008.00000003.1438355.001 BGH.28OCT2008.00000004.1562602.001 Inside them contains the below: 5Discounts 6P150 - Max Total Usage RM150|-221.00 P150 EPP - Talktime RM150... (5 Replies)
Discussion started by: olloong
5 Replies

3. UNIX for Dummies Questions & Answers

Using AWK: Extract data from multiple files and output to multiple new files

Hi, I'd like to process multiple files. For example: file1.txt file2.txt file3.txt Each file contains several lines of data. I want to extract a piece of data and output it to a new file. file1.txt ----> newfile1.txt file2.txt ----> newfile2.txt file3.txt ----> newfile3.txt Here is... (3 Replies)
Discussion started by: Liverpaul09
3 Replies

4. Shell Programming and Scripting

To remove multiple files in FTP

We have a files in FTP server..... after getting the files from FTP by mget *.* i hav to remove all files (multiple files) at once... is there any command to delete multiple files at once (2 Replies)
Discussion started by: nani1984
2 Replies

5. UNIX for Dummies Questions & Answers

How to remove characters from multiple .txt files

Friends, I want to remove charecters from multiple .txt files. Foe example : In this .txt files there are many "ctrl m" present in last of each line in one .txt file. I want to remove "ctrl m" from each line from all .txt files. Need your help regarding this. (4 Replies)
Discussion started by: meetsubhas
4 Replies

6. Shell Programming and Scripting

Remove java code from multiple files

Hello, We have a client who has had an FTP injection attack on their account. Over 600 files have this code added to the files: <script>var t="";var... (10 Replies)
Discussion started by: dhasbro
10 Replies

7. Shell Programming and Scripting

Code to remove files when corresponding file doesnt exist isnt working.

I am trying to add some code to the begging of a script so that it will remove all the .transcript files, when their is no coressponding .wav file. But it doesnt work. This is the code I have added: for transcriptfile in `$voicemaildir/*.transcript`; do wavfile=`echo $transcriptfile | cut -d'.'... (2 Replies)
Discussion started by: ghurty
2 Replies

8. Shell Programming and Scripting

How to remove hidden backslash in multiple files?

Hi I have around 300 files in a folder. When I type ls -l I see the following Mouse.chr10_+_:101862321-101863928.maf Mouse.chr10_+_:101862322-101863928.maf Mouse.chr10_+_:101862323-101863928.maf But when I run my scripts, they couldn't recognise the filename because of hidden backslash like... (5 Replies)
Discussion started by: quincyjones
5 Replies

9. Shell Programming and Scripting

[Solved] How to remove multiple files?

Hi Gurus, I have below files in one directory. the file name has date and time portion which is exactly the file be created. I need keep only lasted created file which is abc_20140101_1550 and remove rest of the file. abc_20140101_1300 abc_20140101_1200 abc_20140101_1400 abc_20140101_1500... (2 Replies)
Discussion started by: ken6503
2 Replies

10. UNIX for Beginners Questions & Answers

How to implement a simple command/code for multiple files?

I have been extracting a row, based on multiple key word from a xls/csv file, by using the following command. I have to implement the same for multiple xls/csv files, therefore please help me to do the same. awk ' { tbp=0 if ($0 ~ keyword1 && k1 == 0) { tbp=1; k1++ } if ($0 ~ keyword2... (2 Replies)
Discussion started by: dineshkumarsrk
2 Replies
DATEINTERVAL.FORMAT(3)							 1						    DATEINTERVAL.FORMAT(3)

DateInterval::format - Formats the interval

SYNOPSIS
public string DateInterval::format (string $format) DESCRIPTION
Formats the interval. PARAMETERS
o $format - The following characters are recognized in the $format parameter string. Each format character must be prefixed by a percent sign ( %). +------------------+--------------------------------------+---+ |$format character | | | | | | | | | Description | | | | | | | | Example values | | | | | | +------------------+--------------------------------------+---+ | | | | | % | | | | | | | | | Literal % | | | | | | | | | | | | % | | | | | | | | | | | Y | | | | | | | | | Years, numeric, at least 2 digits | | | | with leading 0 | | | | | | | | | | | | 01, 03 | | | | | | | | | | | y | | | | | | | | | Years, numeric | | | | | | | | | | | | 1, 3 | | | | | | | | | | | M | | | | | | | | | Months, numeric, at least 2 digits | | | | with leading 0 | | | | | | | | | | | | 01, 03, 12 | | | | | | | | | | | m | | | | | | | | | Months, numeric | | | | | | | | | | | | 1, 3, 12 | | | | | | | | | | | D | | | | | | | | | Days, numeric, at least 2 digits | | | | with leading 0 | | | | | | | | | | | | 01, 03, 31 | | | | | | | | | | | d | | | | | | | | | Days, numeric | | | | | | | | | | | | 1, 3, 31 | | | | | | | | | | | a | | | | | | | | | Total number of days as a result of | | | | a DateTime::diff or (unknown) other- | | | | wise | | | | | | | | | | | | 4, 18, 8123 | | | | | | | | | | | H | | | | | | | | | Hours, numeric, at least 2 digits | | | | with leading 0 | | | | | | | | | | | | 01, 03, 23 | | | | | | | | | | | h | | | | | | | | | Hours, numeric | | | | | | | | | | | | 1, 3, 23 | | | | | | | | | | | I | | | | | | | | | Minutes, numeric, at least 2 digits | | | | with leading 0 | | | | | | | | | | | | 01, 03, 59 | | | | | | | | | | | i | | | | | | | | | Minutes, numeric | | | | | | | | | | | | 1, 3, 59 | | | | | | | | | | | S | | | | | | | | | Seconds, numeric, at least 2 digits | | | | with leading 0 | | | | | | | | | | | | 01, 03, 57 | | | | | | | | | | | s | | | | | | | | | Seconds, numeric | | | | | | | | | | | | 1, 3, 57 | | | | | | | | | | | R | | | | | | | | | Sign " -" when negative, " +" when | | | | positive | | | | | | | | | | | | -, + | | | | | | | | | | | r | | | | | | | | | Sign " -" when negative, empty when | | | | positive | | | | | | | | | | | | -, | | | | | | +------------------+--------------------------------------+---+ RETURN VALUES
Returns the formatted interval. NOTES
Note The DateInterval::format method does not recalculate carry over points in time strings nor in date segments. This is expected because it is not possible to overflow values like "32 days" which could be interpreted as anything from "1 month and 4 days" to "1 month and 1 day". EXAMPLES
Example #1 DateInterval example <?php $interval = new DateInterval('P2Y4DT6H8M'); echo $interval->format('%d days'); ?> The above example will output: 4 days Example #2 DateInterval and carry over points <?php $interval = new DateInterval('P32D'); echo $interval->format('%d days'); ?> The above example will output: 32 days Example #3 DateInterval and DateTime::diff with the %a and %d modifiers <?php $january = new DateTime('2010-01-01'); $february = new DateTime('2010-02-01'); $interval = $february->diff($january); // %a will output the total number of days. echo $interval->format('%a total days')." "; // While %d will only output the number of days not already covered by the // month. echo $interval->format('%m month, %d days'); ?> The above example will output: 31 total days 1 month, 0 days SEE ALSO
DateTime::diff. PHP Documentation Group DATEINTERVAL.FORMAT(3)
All times are GMT -4. The time now is 10:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy