xoops forums

limecity

Friend of XOOPS
Posted on: 2004/9/19 4:51
limecity
limecity (Show more)
Friend of XOOPS
Posts: 1602
Since: 2003/7/6 0
#1

Tracing Anonymous users - spammers

Recently i am receiving several Emails which they send through the Contact module..

More or less, I call it a spam.

How can i trace the IP address of these ppl who abuse the contact form? They supplied with false email address which I am unable to trace.

Is there anyway? Using xoops? using cpanel? or anything to trace down these freaks.



Dave_L

XOOPS is my life!
Posted on: 2004/9/19 5:31
Dave_L
Dave_L (Show more)
XOOPS is my life!
Posts: 2277
Since: 2003/11/7
#2

Re: Tracing Anonymous users - spammers

This is untested, but adding the sender's IP address to the email body should be easy:

modules/contact/index.php

$adminMessage .= "n".$HTTP_SERVER_VARS['HTTP_USER_AGENT']."n";
[
color=ff0000]$adminMessage .= "n".$HTTP_SERVER_VARS['REMOTE_ADDR']."n";[/color]

limecity

Friend of XOOPS
Posted on: 2004/9/19 5:58
limecity
limecity (Show more)
Friend of XOOPS
Posts: 1602
Since: 2003/7/6 0
#3

Re: Tracing Anonymous users - spammers

it worked! it worked!
thank you..

Okay.. now this brings me to another idea..

On the contact form module..
i want to show something like :

Your Ip address : 202.111.222.102 has been logged
Action will be taken on any abuse on this system.

JasonMR

Just can't stay away
Posted on: 2004/9/19 6:33
JasonMR
JasonMR (Show more)
Just can't stay away
Posts: 655
Since: 2004/6/21
#4

Re: Tracing Anonymous users - spammers

You could add this to contact/index.php:
Quote:

echo "Your Ip address : ";
echo $_SERVER['REMOTE_ADDR'];
echo " has been logged!";
echo "<br />Action will be taken on any abuse on this system.";


But I'm not sure where to place it!

Hope it works for you.

JasonMR

Just can't stay away
Posted on: 2004/9/19 7:13
JasonMR
JasonMR (Show more)
Just can't stay away
Posts: 655
Since: 2004/6/21
#5

Re: Tracing Anonymous users - spammers

I've found a more "playful" solution at Mike's!

1- Take this code
Quote:

<?php
$img_number = imagecreate(275,25);
$backcolor = imagecolorallocate($img_number,102,102,153);
$textcolor = imagecolorallocate($img_number,255,255,255);

imagefill($img_number,0,0,$backcolor);
$number = " Your IP is $_SERVER[REMOTE_ADDR]";

Imagestring($img_number,10,5,5,$number,$textcolor);

header("Content-type: image/jpeg");
imagejpeg($img_number);
?>

and place it in a seperate file named ip_image.php, which should be saved it in your contact module folder (though depending on the url you provide in the img-tag!).

2- Edit contact/template/contact.html and place this code in the apropriate space
Quote:

<img src="http://yoursite.com/modules/contact/ip_image.php" alt="IP Address" /> has been logged!<br />Action will be taken on any abuse on this system.


3- under Sys Admin -> Modules, you will need to update your contact module, for changes to be entered into the templates stored in the DB, which are used by XOOPS (and not the actual template file)



I use contact+, but this is how it looks like on my site, after I've made a couple of changes to the image creating script, to suite my needs.

limecity

Friend of XOOPS
Posted on: 2004/9/19 7:49
limecity
limecity (Show more)
Friend of XOOPS
Posts: 1602
Since: 2003/7/6 0
#6

Re: Tracing Anonymous users - spammers

Yeah! it worked. Thanks~
Lols..

I hope XOOPS take this into consideration on implementing such thing into the core contact module.


One more thing.. how do you change the bg color and size of the picture?

$img_number = imagecreate(275,25);
$backcolor = imagecolorallocate($img_number,102,102,153);
$textcolor = imagecolorallocate($img_number,255,255,255);

JasonMR

Just can't stay away
Posted on: 2004/9/19 9:32
JasonMR
JasonMR (Show more)
Just can't stay away
Posts: 655
Since: 2004/6/21
#7

Re: Tracing Anonymous users - spammers

$img_number = imagecreate(275,25);

-> this pair represent the X , Y lengths

$backcolor = imagecolorallocate($img_number,102,102,153);
$textcolor = imagecolorallocate($img_number,255,255,255);

-> these tupples are hex-colors (255,255,255=white;0,0,0=black)

And if you wanted to ask: the border is a style attributed to the img tag:
style="border:1px outset #000044; vertical-align:middle;"


Having an option to select something like this to appear, would definetly be a nice thing! <caugh>developers</caugh>

limecity

Friend of XOOPS
Posted on: 2004/9/19 10:55
limecity
limecity (Show more)
Friend of XOOPS
Posts: 1602
Since: 2003/7/6 0
#8

Re: Tracing Anonymous users - spammers

Lols..
why din i think of that.. ahaha..
i forgot its hex and kept on thinkin its Ip address
silly me..

btw.. maybe you can submit this as a contact module Hack.
then maybe it will catch the attention of the developers~


I am pretty sure many XOOPS user will find it useful.

JasonMR

Just can't stay away
Posted on: 2004/9/19 13:30
JasonMR
JasonMR (Show more)
Just can't stay away
Posts: 655
Since: 2004/6/21
#9

Re: Tracing Anonymous users - spammers

Agreed! https://xoops.org/modules/newbb/viewto ... t&topic_id=24682&forum=15
Executed!