Пример #1
0
        public void AutoTamperRequestAfter(Session oSession)
        {
            //防止刚打开fiddler时,有数据进来但窗口还没初始化完成
            while (!oView.IsHandleCreated)
            {
                ;
            }

            oView.Invoke(new EventHandler(delegate
            {
                JArray jsons  = new JArray();
                oView.url     = oSession.fullUrl;
                oView.rawBody = "";
                string body   = "";
                if (oView.url.Contains("log.dc.cn"))
                {
                    oView.rawBody = oSession.GetRequestBodyAsString();


                    try
                    {
                        body = HttpUtility.UrlDecode(oView.rawBody);
                        body = Lis2013HISWSTest.ZipHelper.GZipDecompressString(body);
                        body = body.Trim();
                    }
                    catch
                    {
                        showErrorForm.setErrorTextToRich("body解码 报错:\n" + oView.url + "\n" + body + "\n原始数据:\n" + oView.rawBody);
                        showErrorForm.Show();
                        showErrorForm.TopMost = true;
                    }

                    if (body.Length > 10)
                    {
                        try
                        {
                            body  = HttpUtility.UrlDecode(body);
                            body  = body.Substring(13, body.Length - 14);
                            jsons = JArray.Parse(body);
                        }
                        catch
                        {
                            showErrorForm.setErrorTextToRich("body转JArray 报错:\n" + oView.url + "\n" + body + "\n原始数据:\n" + oView.rawBody);
                            showErrorForm.Show();
                            showErrorForm.TopMost = true;
                        }

                        oView.addData(jsons);
                    }
                }
            }));
        }
Пример #2
0
        public void AutoTamperRequestAfter(Session oSession)
        {
            //防止刚打开fiddler时,有数据进来但窗口还没初始化完成
            while (!oView.IsHandleCreated)
            {
                ;
            }

            oView.Invoke(new EventHandler(delegate
            {
                JArray jsons  = new JArray();
                oView.url     = oSession.fullUrl;
                oView.rawBody = "";
                string body   = "";
                if (oView.url.Contains("log.dc.cn"))
                {
                    oView.rawBody = oSession.GetRequestBodyAsString();
                    //login_flashphone_response点里嵌套msg
                    //oView.rawBody = "eJztl01z2yAQhn8NvTmD0CeHHmRbufXj1iODANnUklAApU1%2BfVGiIFvjtpNk4kw7ungw%2B7K7sPuggZTUsj25pXUvPoJ4DdI1QIhQRuxdJ9wQhLn77Y3QlFmpWlKrnWwHA9oMSsP2oqGE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hj%2F8AAa2iTg%3D%3D";
                    //browser里包含各种特殊字符
                    //oView.rawBody = "eJzVVFtv0zAY%2FTXlLZWvcfLAwy4qoK17AcHeIsd2WqtOnDnJuu3X4xCw3WlITIhJVFVk%2BZzv6vN9Vc1Hsa%2FuuZnU%2BxU9X7HzFUIVF9X42Ct%2FXOEz%2F4VwPqKLGRucCPdijPdTp%2B%2Bqg3oMIO90y03FO%2BmslqITbdU7KxOLQblKyxgFYUID%2FNMuJeSgxrgsVY4ZwrIsAlfwUe2si7Eb7Yaxsr3qAkeKQQ2Dtl3qsRYFKwgSGROcZIQBntUlkJmimEgpMc1JEzyou0n3rerGYN5Z4bg4BMaOt%2BpeuTlKrGqd55Fg7c6oiicpBEzLhr9w2w0jN%2BaksyWWTCIJMkkgzIgkICsIgBkVOeVMlLJQ0YHh3S5YPu2ri5sA9YaPjXVtgPcTPyod8EHdnbxPAjjtn7ab2lq5gCNW1KSEMfSo26ghBGAJCphDSgikJ5zqyXaRGJ91kn%2Fy%2BNMoKqmbJjDBfGKXM%2FobOb%2BFmmlepmrWVWP47jTHV%2Bu8dvY4JB3f2idtjFfNhq69R%2F8vrnU3PaywrxucLZ79ia3hGi6X20%2B3%2Fuv9gfNJGw9ubrYblN8u6PF%2BhcrZtO%2BN%2BqbqKz3OzjFb43zxf%2FXxy%2Fb6RzbA6IPvKfigxMEuZl9%2FaX9DfuRzsXd2lsCGlmuwxoD5NBCds7C1NrPxZ95wp5MYYaKd00mlETDaT2CvH5RJpIV9tDMICvCMd%2FLsofQTyvN5XXr1v2%2BNdhnjZaByynDue0QZhYAlpEG%2FYPoPF46xflOnZSZYy%2BMkAgTCLxIkjdOIc95gAOsC55hzoSTyQkK84MgnJ3Aw6tR4tO5wooOYqt0lLY2RXrkXUQL83V5E5C32Ir189x242RUB";
                    //头部_uniq_key=animal_androidcncm_prod&_batch_value= 尾部_user_id=
                    //oView.rawBody = "_uniq_key=animal_androidcncm_prod&_batch_value=%5B%7B%22_ac_type%22%3A%2288%22%2C%22equipment%22%3A%22nocrack%22%2C%22viral_id%22%3A%22257862969-1566189144059-21191%22%2C%22time%22%3A%2220190820000630%22%2C%22mac%22%3A%22DCEE068986F3%22%2C%22pf%22%3A%22jinli%22%2C%22sub_category%22%3A%22noti_recieve%22%2C%22networktype%22%3A%22PSDN%22%2C%22category%22%3A%22noti%22%2C%22time_zone%22%3A%22%2B8%22%2C%22location%22%3A%22CN%22%2C%22src%22%3A%22gsp_client%22%2C%22textId%22%3A%220%22%2C%22clientversion%22%3A%226.0%22%2C%22gameversion%22%3A%221.68%22%2C%22lang%22%3A%22zh_CN%22%2C%22ip%22%3A%22192.168.199.229%22%2C%22udid%22%3A%22e28022c0709e0cdf%22%2C%22clienttype%22%3A%22HUAWEI+NXT-AL10%22%2C%22type%22%3A%22notification%22%2C%22install_key%22%3A%220277ac9f-a5e9-4b95-bb11-26386931a405%22%7D%2C%7B%22_ac_type%22%3A%2288%22%2C%22equipment%22%3A%22nocrack%22%2C%22viral_id%22%3A%22257862969-1566214684231-21187%22%2C%22time%22%3A%2220190820000630%22%2C%22mac%22%3A%22DCEE068986F3%22%2C%22pf%22%3A%22jinli%22%2C%22sub_category%22%3A%22noti_recieve%22%2C%22networktype%22%3A%22PSDN%22%2C%22category%22%3A%22noti%22%2C%22time_zone%22%3A%22%2B8%22%2C%22location%22%3A%22CN%22%2C%22src%22%3A%22gsp_client%22%2C%22textId%22%3A%220%22%2C%22clientversion%22%3A%226.0%22%2C%22gameversion%22%3A%221.68%22%2C%22lang%22%3A%22zh_CN%22%2C%22ip%22%3A%22192.168.199.229%22%2C%22udid%22%3A%22e28022c0709e0cdf%22%2C%22clienttype%22%3A%22HUAWEI+NXT-AL10%22%2C%22type%22%3A%22notification%22%2C%22install_key%22%3A%220277ac9f-a5e9-4b95-bb11-26386931a405%22%7D%5D&_user_id=257862969";
                    //嵌套ads_error不想支持
                    //oView.rawBody = "eJztWF2P2ygU%2FTXet4wwtmP7YR%2FyKVVaVatVtX1ExBAHx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0s6G1ZukGZr2UtMXzcmjf1M6Mtrng2jXUG2O12MgzwNJiBY5EGu%2F%2FRDGkxhMF0EiyTIJkFu3kR4W5udmJYsyMYdGAb58itJmlOle2%2FNxpRb2%2FYjWzMfMyC645NZoG11Z%2FvlXmE8lPG1sGGArvxetBjoIqKVhVs67S7SRj99EyopqvsVYxR60WGGhuF7HKw%2F7zXvUkJp%2Bfez%2B8orw0u%2B1sW7l2BtYIyfmfYQ3Ojj2l9FyHo1jL1smWKlcE%2BQvx3zt2P%2Bco7ZSUAzn%2Fb8QLTKrfNFY9WXz8Gc8SDUifOMaN%2FGj93riOfHNZZbIxjkO%2B7b%2BLGQrOwR%2B4ey5Gu%2BadxMW4Fxk5ZvuXjig739BDbqe8oP46Q140Ki834a5yswTsYYxOtoFY8jnKwSQoF2zHGahan%2F9c8d725DsztnuEMCWGd9o7e%2F1xvf13t%2FdHu6U%2B1dWgneN07UoVupy4OCttUt8s1fNWG%2Frg88x3wZOv%2Fjf3xRa44%3D";


                    try
                    {
                        body = HttpUtility.UrlDecode(oView.rawBody);
                        body = Lis2013HISWSTest.ZipHelper.GZipDecompressString(body);
                        body = body.Trim();
                    }
                    catch
                    {
                        //这里什么都不错,无法解压base64可能是因为本来就是解压过的
                    }

                    if (body.Length > 10)
                    {
                        try
                        {
                            body = HttpUtility.UrlDecode(body);
                            //MessageBox.Show(body);
                            {
                                //抓幽灵bug
                                if (body.Length < 14)
                                {
                                    //showErrorForm.setErrorTextToRich("body.Length < 14 报错:\n" + body + "\n原始数据:\n" + oView.rawBody);
                                    //showErrorForm.Show();
                                    //showErrorForm.TopMost = true;
                                    string mailContent = "body.Length < 14 报错:\n" + body + "\n原始数据:\n" + oView.rawBody;
                                    SendMail.Send("*****@*****.**", "DCviewer报错了", mailContent, new string[] { });
                                    return;
                                }
                            }

                            int startIndex = body.IndexOf('[');
                            int endIndex   = body.LastIndexOf("]");
                            body           = body.Substring(startIndex, endIndex - startIndex + 1);

                            jsons = JArray.Parse(body);
                        }
                        catch
                        {
                            //showErrorForm.setErrorTextToRich("body转JArray 报错:\n" + oView.url + "\n" + body + "\n原始数据:\n" + oView.rawBody);
                            //showErrorForm.Show();
                            //showErrorForm.TopMost = true;
                            string mailContent = "body转JArray 报错:\n" + oView.url + "\n" + body + "\n原始数据:\n" + oView.rawBody;
                            SendMail.Send("*****@*****.**", "DCviewer报错了", mailContent, new string[] { });
                            return;
                        }

                        oView.addData(jsons);
                    }
                }
            }));
        }