Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

PHP 

Forum signature generator checks open ports

Generating your Forum Signature

[Image: sniper-150x450.jpg]

Code
https://7ol.eu/siggen/?ip=7ol.eu&port[]=80&port[]=8080&port[]=22&port[]=23&img=http://www.gtavcrews.com/cards/images/backgrounds/sniper-150x450.jpg

Code
https://7ol.eu/siggen/?ip=SERVER&port[]=PORT1&port[]=PORT2&port[]=PORT3&img=IMG_SOURCE

Ip : is a string that contains your IP/Hostname
Port : is an array that contains your ports you want to scan
Img : is a string that contains your img source

I thought it would be fun to make something like this for personal use.
Pretty simple but also quite useful for me this script runs on my second Webserver.

I'm going to edit it a bit, improve it here and there.
It looks pretty good.

  1. It'll get the Host/IP
  2. Check if the ports are Up/Down
  3. Write results on JPG Image
  4. Spits out an JPG Image




Ex. This would make the sig. a lot more interactive.
PHP Code

<?php 
$host 
= $_SERVER['REMOTE_ADDR'];
$xtra = $_SERVER['HTTP_USER_AGENT'];
$xtra2 = "Host : " . gethostbyaddr($_SERVER['REMOTE_ADDR']);
$xtra3 = "Used port : " . $_SERVER['REMOTE_PORT'];
$xtra4 = "Ref:".$_SERVER['HTTP_REFERER']; 

Ex. This would make the sig a lot more interesting
PHP Code

<?php 
$ip
= $text . "\n". $text2. "\n" . $text3 ." \n". $output[0]."\n".$output[1]. "\n" . $xtra2. "\n". $xtra3. "\n". $xtra4. "\n--------------------------\n" ;

//file name to put it in this can also be done using SQL
//$logFile = 'logs.txt';

//command for opening the logfile
$fO = fopen('logs.txt' , 'a');

//write everything into the earlier mentioned file and with the earlier specified Variable 
fwrite($fO, $ip);

//close the file ^^
fclose($fO); 
Public Honeypot Project: https://github.com/Slober3/PotHead
Honeypot Twitter: https://twitter.com/HoneyHive9
BTC: 1Anime1QrjwsEmz8bC2FwVcNXDLxP3SWAJ

Erin Wrote:It’s fine. There’s nothing to be afraid of. Calm down, Lilan
(Dec 18, 2016 09:13 PM)Yani Wrote:  Mhm. Interesting. But to be honest; if you know your way around a few ports you should probably be wanting to do a full nmap of the ip anyways.

I love the extra possibilities you have

Ex. This would make the sig. a lot more interactive.
PHP Code

<?php 
$host 
= $_SERVER['REMOTE_ADDR'];
$xtra = $_SERVER['HTTP_USER_AGENT'];
$xtra2 = "Host : " . gethostbyaddr($_SERVER['REMOTE_ADDR']);
$xtra3 = "Used port : " . $_SERVER['REMOTE_PORT'];
$xtra4 = "Ref:".$_SERVER['HTTP_REFERER']; 

Ex. This would make the sig a lot more interesting
PHP Code

<?php 
$ip
= $text . "\n". $text2. "\n" . $text3 ." \n". $output[0]."\n".$output[1]. "\n" . $xtra2. "\n". $xtra3. "\n". $xtra4. "\n--------------------------\n" ;

//file name to put it in this can also be done using SQL
//$logFile = 'logs.txt';

//command for opening the logfile
$fO = fopen('logs.txt' , 'a');

//write everything into the earlier mentioned file and with the earlier specified Variable 
fwrite($fO, $ip);

//close the file ^^
fclose($fO); 
Public Honeypot Project: https://github.com/Slober3/PotHead
Honeypot Twitter: https://twitter.com/HoneyHive9
BTC: 1Anime1QrjwsEmz8bC2FwVcNXDLxP3SWAJ

Erin Wrote:It’s fine. There’s nothing to be afraid of. Calm down, Lilan
(Dec 19, 2016 09:34 AM)Yani Wrote:  Mhm... Only the IP, useragent and referrer are interesting. The used port is useless as it's simply the outgoing port and can't be used as an attack vector.

You'd be better off using:

PHP Code

<?php 
file_put_contents
('log.txt', $data, FILE_APPEND) 

fwrite is cool and all, but if you're just adding some data it's exactly the same:
https://secure.php.net/manual/en/functio...ntents.php

There is a reason I'm using fopen.
file_put_contents is a wrapper.
fopen should in theory be faster if you write multiple times to the same file That's why I'm using it.

The best thing should be to writ the output tot an actual DB.
This would make the acquired data much easier to manage.

The "Used port" is just a nice gimmick ✌

This however would be also crucial
PHP Code

<?php 
$date
=date('m/d/Y h:i:s a', time()); 
Public Honeypot Project: https://github.com/Slober3/PotHead
Honeypot Twitter: https://twitter.com/HoneyHive9
BTC: 1Anime1QrjwsEmz8bC2FwVcNXDLxP3SWAJ

Erin Wrote:It’s fine. There’s nothing to be afraid of. Calm down, Lilan
(Dec 19, 2016 01:39 PM)Yani Wrote:  Keep in mind by the way that putting a dynamic image like thit as your signature or avatar is against the HF rules.

Don't get yourself in trouble don't use this as a forum signature here. xD
This is just an example code.
Public Honeypot Project: https://github.com/Slober3/PotHead
Honeypot Twitter: https://twitter.com/HoneyHive9
BTC: 1Anime1QrjwsEmz8bC2FwVcNXDLxP3SWAJ

Erin Wrote:It’s fine. There’s nothing to be afraid of. Calm down, Lilan
So where do i go to really if i want to create a unique and interactive signature for forum posts. Serious, real talk ?
Thanks ahead,


Possibly Related Threads...
Thread / Author Replies Views Last Post
[PHP] by raid0Apr 15, 2019 04:15 AM 19 3,090 Apr 15, 2019 04:15 AM
Last Post: newQuery
[PHP] by 2073436Jun 16, 2018 11:15 AM 3 231 Jun 16, 2018 11:15 AM
Last Post: 2073436
[PHP] by ImDeepWithWindowsJan 20, 2017 03:21 PM 6 401 Jan 20, 2017 03:21 PM
Last Post: DataBuster