Previous Post
My website has been hacked at some point, and around 220 pages have been modified with a long block of advertising links.
It must have been some time ago, since even my "clean" backup copies of the site are infected.
It's been quite a clever little spambot, randomly scambling the order it placed about 150 links on each page to make it harder for bulk deletion. The links are, for some reason, in black font on my black backgrounds, at the very bottom of pages. For example: http://www.chillwater.org.uk/HH/dull%20thud.htm
What I need to do to eliminate it without hand-editing every file is to use Notepad++ or some such program. Specifically, I need a regular expression or macro that works through batch files and finds the text:
[div style="position:absolute;filter:alpha (the square bracket is actually a left arrow)
It then needs to delete that and all text after it in the whole file, replacing it with:
[/div] [/body]
Any ideas?
|
Looking at the example page, it looks like the offending crap is simply the last line in the file.
So, all you need to do is replace:
[div style="position:absolute;filter:alpha -> to end of line
with:
[/div] [/body] [/HTML]
In Notepad++, search and replace can use regular expressions (You need to enable it in the dialogue), and the pattern you want is:
{div style="position:absolute;filter:alpha[[:print:]]*$
(Where the brace character at the start of the line is an angle bracket, and the square brackets are really square brackets - [[:print:]]*$ is "match any number of printable characters up to the end of the line)
As is always the case with my writing, please feel free to comment.
I welcome both positive and negative criticism of my work, although I cannot promise to enjoy the negative.
|
- Untold Tales of the Lair Legion #349: Change and Decay · The Hooded Hood · Mon Dec 14, 2015 at 07:18:03 pm EST
- That's a rich gumbo of a tale. · WGMY 104.1 · Sun Jan 03, 2016 at 10:48:15 pm EST
- Loved the interations of the couple LOL LOL..great ironic dialogue ;) (no text) · Yo just read the firs part, tomorrow more · Tue Dec 22, 2015 at 03:53:44 pm EST
- Man alive... that is a lot of continuity. One would think that new guy would get a hernia just sorting through it all. · Visionary · Thu Dec 17, 2015 at 12:55:20 am EST
- As conditions go, decay beats intertia (no text) · killer shrike looks forward to seeing what's next · Wed Dec 16, 2015 at 09:42:25 pm EST
- I hate it when my quantum buffer fields are breached! · Al B. Harper · Wed Dec 16, 2015 at 03:24:47 am EST
- So, it looks like there have been some changes ... I look forward to catching up. :) (no text) · CrazySugarFreakBoy! · Wed Dec 16, 2015 at 02:05:52 am EST
- This is change we can believe in! But that's mostly due to Retcons! · L! · Wed Dec 16, 2015 at 01:34:22 am EST
- Re: Untold Tales of the Lair Legion #349: Change and Decay · J. Jonah Jerkson is stupefied by the audacity of the new Hooded Hood · Tue Dec 15, 2015 at 09:56:39 pm EST
- Change isn't bad, it's the decay that concerns me. · Anime Jason · Tue Dec 15, 2015 at 12:09:45 pm EST
- Ah, those happy memories of playing House of the Dead: Overkill. Well, with a plot this time... · Manga Shoggoth · Tue Dec 15, 2015 at 05:04:29 am EST
|