Esempio n. 1
0
        public AuthorFilesVM(SettingsVM vm) : base(vm.MWVM)
        {
            IsUploading = _isUploading;
            Picker      = new FilePickerVM(this);

            _isVisible = AuthorAPI.HaveAuthorAPIKey.Select(h => h ? Visibility.Visible : Visibility.Collapsed)
                         .ToProperty(this, x => x.IsVisible);

            SelectFile = Picker.ConstructTypicalPickerCommand(IsUploading.StartWith(false).Select(u => !u));

            HyperlinkCommand = ReactiveCommand.Create(() => Clipboard.SetText(FinalUrl));

            ManageFiles = ReactiveCommand.Create(async() =>
            {
                var authorApiKey = await AuthorAPI.GetAPIKey();
                Utils.OpenWebsite(new Uri($"{Consts.WabbajackBuildServerUri}author_controls/login/{authorApiKey}"));
            });

            Upload = ReactiveCommand.Create(async() =>
            {
                _isUploading.OnNext(true);
                try
                {
                    using var queue = new WorkQueue();
                    var result      = await(await Client.Create()).UploadFile(queue, Picker.TargetPath,
                                                                              (msg, progress) =>
                    {
                        FinalUrl       = msg;
                        UploadProgress = (double)progress;
                    });
                    FinalUrl = result.ToString();
                }
                catch (Exception ex)
                {
                    FinalUrl = ex.ToString();
                }
                finally
                {
                    FinalUrl = FinalUrl.Replace(" ", "%20");
                    _isUploading.OnNext(false);
                }
            }, IsUploading.StartWith(false).Select(u => !u)
                                            .CombineLatest(Picker.WhenAnyValue(t => t.TargetPath).Select(f => f != default),
                                                           (a, b) => a && b));
        }
Esempio n. 2
0
        protected override void BeforeStarting()
        {
            MySqlHelper db = DbHelper.CreateMySqlHelper("host=localhost;database=liba_user;uid=root;pwd=123456;charset=utf8") as MySqlHelper;

            using (System.Data.Common.DbDataReader reader = db.ExecuteReader("SELECT uid,uname from users where email='' order by uid asc", System.Data.CommandBehavior.CloseConnection))
            {
                //and uname REGEXP('^[0-9a-z_-]+$')
                while (reader.Read())
                {
                    string   uid   = reader.GetInt64(0).ToString();
                    string   uname = reader.GetString(1).Trim();
                    FinalUrl url   = Url.CreateFinalUrl(String.Format("http://bbs.sh.libaclub.com/sendpass.php?action=sendme&username1={0}&id={1}", System.Web.HttpUtility.UrlEncode(Encoding.Default.GetBytes(uname)), uid), null) as FinalUrl;
                    url.UriEscape = false;
                    if (null != url)
                    {
                        url.ContentHandlers.Add(new Libahander2());
                        this.ManualQueue(url, false);
                    }
                }
            }
        }
Esempio n. 3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (ResourceName.Length != 0)
            {
                hash ^= ResourceName.GetHashCode();
            }
            if (Campaign.Length != 0)
            {
                hash ^= Campaign.GetHashCode();
            }
            if (phoneNumber_ != null)
            {
                hash ^= PhoneNumber.GetHashCode();
            }
            if (FinalUrl.Length != 0)
            {
                hash ^= FinalUrl.GetHashCode();
            }
            if (AdvertisingLanguageCode.Length != 0)
            {
                hash ^= AdvertisingLanguageCode.GetHashCode();
            }
            if (businessSettingCase_ == BusinessSettingOneofCase.BusinessName)
            {
                hash ^= BusinessName.GetHashCode();
            }
            if (businessSettingCase_ == BusinessSettingOneofCase.BusinessLocationId)
            {
                hash ^= BusinessLocationId.GetHashCode();
            }
            hash ^= (int)businessSettingCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Esempio n. 4
0
        private static async Task Main(string[] args)
        {
            Console.WriteLine("Credits goes to : Mr.Ali ");
            Console.WriteLine("Author,Coded By => Bashar Bachir");
            if (args[0].Contains("BasharBachir"))
            {
                var fl   = File.ReadAllLines(args[0]);
                var strb = new StringBuilder();
                for (int i = 1; i < fl.Length; i++)
                {
                    var matches2 = Regex.Matches(fl[i], @"(?<=http://)(.+?)(?=/)");
                    foreach (var m in matches2)
                    {
                        strb.Append("http://" + m + " " + m + Environment.NewLine).Replace("www.", "").Replace("\"", "");
                    }
                }
                File.WriteAllText("ProtrctionTips.txt", strb.ToString());
            }
            var goodUrls = new StringBuilder();
            var ListF    = File.ReadAllLines("ProtrctionTips.txt");

            if (!Directory.Exists(DirName))
            {
                Directory.CreateDirectory(DirName);
            }
            if (!Directory.Exists(Urls))
            {
                Directory.CreateDirectory(Urls);
            }
            for (int i = 0; i < ListF.Length; i++)
            {
                var x  = ListF[i].Split(' ')[0];
                var xx = ListF[i].Split(' ')[1];
                if (!x.EndsWith("/"))
                {
                    PureUrl = x + "/";
                    if (x.Contains("https"))
                    {
                        var replace = PureUrl.Replace("https", "http");
                    }
                }
                else
                {
                    if (x.Contains("https"))
                    {
                        PureUrl = x.Replace("https", "http");
                        if (!x.EndsWith("/"))
                        {
                            PureUrl = x + "/";
                        }
                    }
                }

                if (x.EndsWith("/") && !x.Contains("https"))
                {
                    PureUrl = x;
                }

                try
                {
                    var task = Task.Run(async() => await Microsoft(PureUrl.Replace("https", "http").Replace(" ", "").Replace("\"", "")));
                    Result = task.Result;
                }
                catch
                {
                    Console.ForegroundColor = ConsoleColor.Red;
                    Console.WriteLine($"{PureUrl.Replace("https", "http").Replace(" ", "").Replace("\"", "")} is Down");
                    Console.ForegroundColor = ConsoleColor.White;
                    goto Down;
                }

                var matches = Regex.Matches(Result, @"(?<=wp-content/themes/)(.+?)(?=/)");
                foreach (var m in matches)
                {
                    ThemeName = m.ToString();
                    break;
                }
                var matches2 = Regex.Matches(Result, @"(?<=://)(.+?)(?=/)");
                foreach (var m in matches2)
                {
                    if (!m.ToString().Contains(xx))
                    {
                        continue;
                    }
                    ThemeBasicUrl = m.ToString();
                    break;
                }
                Console.ForegroundColor = ConsoleColor.DarkGray;
                Console.WriteLine($"Target Url Generating ..... ");
                Console.ForegroundColor = ConsoleColor.Cyan;
                FinalUrl = $"http://{ThemeBasicUrl}/wp-content/themes/{ThemeName}.zip".Replace(" ", "").Replace("\"", "");
                CharUrl  = FinalUrl.ToCharArray();
                Console.WriteLine(FinalUrl);
                Console.ForegroundColor = ConsoleColor.DarkGray;
                Console.WriteLine($"Scanning .......");
                var request = (HttpWebRequest)WebRequest.Create(FinalUrl);
                request.Method = "HEAD";
                try
                {
                    Response = (HttpWebResponse)request.GetResponse();
                    Console.ForegroundColor = ConsoleColor.DarkGray;
                    Console.WriteLine($"Scanning for .zip Extension ..... ");
                    Console.ForegroundColor = ConsoleColor.Green;
                    Console.WriteLine("Found .. Downloading Now");
                    if (File.Exists($"{DirName}/{ThemeName}.zip"))
                    {
                        File.WriteAllBytes($"{DirName}/{ThemeName +I}.zip", Microsoft(CharUrl).Result);
                        I++;
                    }
                    else
                    {
                        File.WriteAllBytes($"{DirName}/{ThemeName}.zip", Microsoft(CharUrl).Result);
                    }
                    Console.WriteLine($"The File {ThemeName}.zip has been Downloaded To {AppDomain.CurrentDomain.BaseDirectory+ DirName}\\{ThemeName}.zip");
                    goodUrls.Append(new string(CharUrl) + Environment.NewLine);
                    File.AppendAllText($"{Urls}/GoodUrls.txt", goodUrls.ToString());
                }
                catch
                {
                    Console.ForegroundColor = ConsoleColor.Red;
                    Console.WriteLine("No Theme With Zip Extension Found");
                    Console.ForegroundColor = ConsoleColor.DarkGray;
                    Console.WriteLine($"Scanning for .rar Extension ..... ");

                    try
                    {
                        if (File.Exists($"{DirName}/{ThemeName}.zip".Substring($"{ThemeName}.zip".Length - 3) + "rar"))
                        {
                            File.WriteAllBytes($"{DirName}/{ThemeName}.zip".Substring($"{ThemeName+I}.zip".Length - 3) + "rar", Microsoft(CharUrl).Result);
                            I++;
                        }
                        else
                        {
                            File.WriteAllBytes($"{DirName}/{ThemeName}.zip".Substring($"{ThemeName}.zip".Length - 3) + "rar", Microsoft(CharUrl).Result);
                        }

                        Thread.Sleep(1000);
                        Console.WriteLine($"The File {ThemeName}.rar has been Downloaded To {AppDomain.CurrentDomain.BaseDirectory + DirName}\\{ThemeName}.rar ");
                        goodUrls.Append(new string(CharUrl) + Environment.NewLine);
                        File.AppendAllText($"{Urls}/GoodUrls.txt", goodUrls.ToString());
                    }
                    catch
                    {
                        Console.ForegroundColor = ConsoleColor.Red;
                        Console.WriteLine("No Theme With Rar Extension Found");
                    }
                }
                finally
                {
                    Console.ForegroundColor = ConsoleColor.White;
                    Response?.Close();
                }
                Down :;
            }
            Console.ForegroundColor = ConsoleColor.Green;
            File.AppendAllText($"{Urls}/GoodUrls.txt", goodUrls.ToString());
            Console.WriteLine("The Job is Done .. Check Themes and GoodUrls Folders");
            Console.ForegroundColor = ConsoleColor.White;
            Console.WriteLine("Credits goes to : Mr.Ali ");
            Console.WriteLine("Author,Coded By => Bashar Bachir");
        }
Esempio n. 5
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (FindingType.Length != 0)
            {
                hash ^= FindingType.GetHashCode();
            }
            if (Severity != global::Google.Cloud.WebSecurityScanner.V1.Finding.Types.Severity.Unspecified)
            {
                hash ^= Severity.GetHashCode();
            }
            if (HttpMethod.Length != 0)
            {
                hash ^= HttpMethod.GetHashCode();
            }
            if (FuzzedUrl.Length != 0)
            {
                hash ^= FuzzedUrl.GetHashCode();
            }
            if (Body.Length != 0)
            {
                hash ^= Body.GetHashCode();
            }
            if (Description.Length != 0)
            {
                hash ^= Description.GetHashCode();
            }
            if (ReproductionUrl.Length != 0)
            {
                hash ^= ReproductionUrl.GetHashCode();
            }
            if (FrameUrl.Length != 0)
            {
                hash ^= FrameUrl.GetHashCode();
            }
            if (FinalUrl.Length != 0)
            {
                hash ^= FinalUrl.GetHashCode();
            }
            if (TrackingId.Length != 0)
            {
                hash ^= TrackingId.GetHashCode();
            }
            if (form_ != null)
            {
                hash ^= Form.GetHashCode();
            }
            if (outdatedLibrary_ != null)
            {
                hash ^= OutdatedLibrary.GetHashCode();
            }
            if (violatingResource_ != null)
            {
                hash ^= ViolatingResource.GetHashCode();
            }
            if (vulnerableHeaders_ != null)
            {
                hash ^= VulnerableHeaders.GetHashCode();
            }
            if (vulnerableParameters_ != null)
            {
                hash ^= VulnerableParameters.GetHashCode();
            }
            if (xss_ != null)
            {
                hash ^= Xss.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }