Find the answer to your Linux question:
Page 2 of 4 FirstFirst 1 2 3 4 LastLast
Results 11 to 20 of 38
maybe i didnt put file in it. im pretty suire that putting : in it will not work either tho...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Linux Engineer
    Join Date
    Dec 2002
    Location
    New Zealand
    Posts
    766

    maybe i didnt put file in it. im pretty suire that putting : in it will not work either tho

  2. #12
    Linux Newbie
    Join Date
    Jan 2004
    Location
    Istanbul,Turkey
    Posts
    151
    any idea how this works?


    Have a nice day

  3. #13
    Linux Enthusiast scientica's Avatar
    Join Date
    Sep 2003
    Location
    South- or "Mid-" Sweden
    Posts
    742
    Quote Originally Posted by mesbaba8
    any idea how this works?
    somthing like http://www.dolda2000.com/~fredrik/info.php but instead raw text an image is generated - I've seen some PHP examples of that.
    Regards Scienitca (registered user #335819 - http://counter.li.org )
    --
    A master is nothing more than a student who knows something of which he can teach to other students.

  4. $spacer_open
    $spacer_close
  5. #14
    Linux Newbie
    Join Date
    Jan 2004
    Location
    Istanbul,Turkey
    Posts
    151
    yes but it is not a php or a script. its only :
    img]http://www.danasoft.com/vipersig.jpg[/img
    Have a nice day

  6. #15
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    There is nothing at all that prevents that from being a script. Just because the URL ends in .jpg doesn't prevent the web server from treating it specially.

  7. #16
    Just Joined!
    Join Date
    Sep 2003
    Posts
    46
    That sign is pretty neat! I've been thinking about doing something like that for a sig using perl and imagemagick. I haven't figured out how to use imagemagick right yet, since I haven't looked at the docs much. I'm thinking I could make it also display a bunch of other info like the current time from NTP, the weather, their whois info, fortune quotes, other random stuff, and maybe some bar graphs of uptime/load stats from the server.

    Of course, my web server is just an old K6-2 450 on a DSL link. It serves my current sigs fine(when the router hasn't crashed), but I don't know how fast it would be for that kind of thing. i guess I'll find out

  8. #17
    Just Joined!
    Join Date
    Sep 2003
    Posts
    46
    Well, I got my new sig done. Its a little big, although the compression cuts it down in real size a lot, but it works like that sign. I figured out why that file .jpg. Apparently, a lot of forums check to make sure any inline image ends in an image extension. The .jpg extension is the only way you can get it to work. Since my sig script is in an Apache ScriptAlias directory, if it is chmod +x, Apache will exec it no matter what the extension is.

    If anyone wants the code for it, I can post it, although its just a quick hack, so the code isn't exactly great programming. I originally though about calling queso or something to fingerprint the OS, but I realized I'd have to suid root it, and that opens up a big security hole. Dolda2000, how did you manage to solve that problem with your script? Did you use a suid wrapper script or something? AFAIK nmap won't do -O without root, or can you change that?

  9. #18
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Well, I didn't really solve it properly, so to speak. I just put it in the bin directory in my home dir, which noone but me and apache has access to anyway. I was simply planning on putting it down later.

  10. #19
    Linux Newbie
    Join Date
    Jan 2004
    Location
    Istanbul,Turkey
    Posts
    151
    i'd like to have a sign like this,but my pc is not a web server now,and i have a website hosting on iis which has php and perl support.
    will it also run on iis?
    Have a nice day

  11. #20
    Just Joined!
    Join Date
    Sep 2003
    Posts
    46
    Yes, you could probably do something like that.

    My code is just quick and kind of sloppy, but it does the job. You'll want something different for your sig, but this is the basic idea:
    Code:
    use Image::Magick;
    use strict;
    my $sig=Image::Magick->new();
    
    #Read plain sig
    $sig->Read("base.jpg");
    
    my $curry=15;
    my $xleft=10;
    
    #Add remote IP
    $sig->Annotate(text=>"Your IP address: $ENV{'REMOTE_ADDR'}", x=>$xleft, y=>$curry, stroke=>"#00FF00", fill=>"#00FF00", pointsize=>10);
    $curry += 10;
    
    #Do whois lookup
    use Net::Whois::ARIN;
    my $w = Net::Whois::ARIN->new;
    my @results = $w->net($ENV{'REMOTE_ADDR'});
    foreach my $org (@results) {
        if($org->{'OrgName'}) {
    	my $whoistext = "ISP: " . $org->{'OrgName'};
    	$sig->Annotate(text=>"$whoistext", x=>$xleft, y=>$curry, stroke=>"#00FF00", fill=>"#00FF00", pointsize=>10);
    	$curry += 10;
        }
    }
    
    #Do OS detection
    $sig->Annotate(text=>"Active scans currently disabled.  Not going to do it.", x=>$xleft, y=>$curry, stroke=>"#FF0000", fill=>"#FF0000", pointsize=>10);
    $curry += 10;
    
    #Do use agent printout
    $sig->Annotate(text=>"You say you are using:", x=>$xleft, y=>$curry, stroke=>"#00FF00", fill=>"#00FF00", pointsize=>10);
    $curry += 10;
    $sig->Annotate(text=>"$ENV{'HTTP_USER_AGENT'}", x=>$xleft, y=>$curry, stroke=>"#00FF00", fill=>"#00FF00", pointsize=>10);
    $curry += 10;
    
    #End
    $sig->Annotate&#40;text=>"<<<COMPLETE>>>", x=>$xleft, y=>$curry, stroke=>"#00FF00", fill=>"#00FF00", pointsize=>10&#41;;
    $curry += 10;
    $sig->Annotate&#40;text=>"%/usr/games/fortune            Click my sig to run", x=>$xleft, y=>$curry, stroke=>"#00FF00", fill=>"#00FF00", pointsize=>10&#41;;
    $curry += 10;
    
    #Write sig
    print "Content-type&#58; image/jpeg\r\n\r\n";
    $sig->Write&#40;'jpeg&#58;-'&#41;;
    You'll need the ARIN whois module for the whois part to work. You'll of course need image magick to be installed with its Perl module, which it may or may not be on your webhost.

    I had some problems with calling the whois command, so I used the module to do it.

    Its really pretty simple. You pretty much just take a base image, add some dynamic text to it, and write it to STDOUT. You WILL be able to at least print the IP address with a perl script on your webhost, you just might have some problems with the other things if they don't have the modules installed. You can add outputs from fortune or whatever else too.

    Heh. You can look at my sig and compare with the code.

Page 2 of 4 FirstFirst 1 2 3 4 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •