Are you sure you’re httpd?

April 11th, 2009

To find all apache processes and make sure they’re running httpd do the following:

You should see an ouput of “PID: 1234 is running /usr/sbin/httpd or something similar. If you see /usr/bin/perl you may have a compromise on your hands.

for i in `ps -U48 | awk '/\d/ {print $1}'`; do lsof -p$i | awk '/txt/ {print "PID: "$2 " is running " $9}' ; done

Simpleviewer pro + shadowbox

April 3rd, 2009

Click here to see the final result!

Requirements:

  • swfobject.js
  • jquery.js
  • shadowbox-query.js
  • shadowbox.js
  • a.css
  • shadowbox.css
  • Flash editing application

Lets get started:

  • Open the file “ImageArea.as”

on line 100, add the following line:
mClip_mc.onRelease =
Delegate.create(this,openImageLink);

on line 281 in the function “openImageLink” comment out the original
“geturl” statement, and add the second one. note: putting “//” will comment in an actionscript file.


//getURL(mXMLManager.imagePath +
mXMLManager.imageFileNames[mCurrentImageIndex],"_blank");
getURL("javascript:abrirSB('img', '"+mXMLManager.title+"',
'"+mXMLManager.imagePath +
mXMLManager.imageFileNames[mCurrentImageIndex]+"')", "_self");

 

  • Save that file, and republish your fla file.
  • All of the files in the “inc” and “images” folder should be in your
    document root, (you should have the viewer.swf file, images folder, inc
    folder, and all those other folders in there.)
  • Edit your index.html file

add the following to the “head” area:
<script src="inc/swfobject.js" type="text/javascript"></script><script src="inc/jquery.js" type="text/javascript"></script> <script src="inc/shadowbox-jquery.js" type="text/javascript"></script> <script src="inc/shadowbox.js" type="text/javascript"></script> <script type="text/javascript"><!-- $(document).ready(function(){ var options = { resizeLgImages: true, loadingImage: "images/loading.gif", displayNav: true, handleUnsupported: 'remove', keysClose: ['c', 27], // c or esc autoplayMovies: false }; Shadowbox.init(options); }); function abrirSB(type, title, url) { Shadowbox.init({skipSetup: true}); Shadowbox.open({type: type, title: title, content: url}); }; // --></script>

 

That should be it!

I know there are some problems with this method, it will not allow you to
use the right and left buttons to change images, but it’s very nice
functionality to have.

Please please support this great product, I modified this code with very
little actionscript 2 knowledge, and it is very well documented in the
sourcecode.

Let me know if you have any questions!