Exemplo n.º 1
0
        /// <summary>
        /// Extracts the complete URL (which means ScanProvider plus query) of
        /// the selected Dork.
        /// </summary>
        /// <returns>URL of the selected Dork.</returns>
        private string GetRequestFromSelected()
        {
            TreeNode treenode = tvwDorks.SelectedNode;

            if (treenode != null)
            {
                Dork dork = treenode.Tag as Dork;
                if (dork != null)
                {
                    IScanProvider  scanProvider = new ScanGoogleProvider();
                    RequestBuilder req          = new RequestBuilder(scanProvider);

                    return(req.getRequest(dork.Query, scanHostTextBox.Text.Trim(), 0));
                }
            }
            return(null);
        }
Exemplo n.º 2
0
        /// <summary>
        /// MouseMove-event. This enables drag-and-drop if a dork is dragged somewhere,
        /// (to a browser eg).
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tvw_MouseMove(object sender, MouseEventArgs e)
        {
            if ((e.Button & MouseButtons.Left) == MouseButtons.Left)
            {
                TreeNode treenode = tvwDorks.SelectedNode;
                if (treenode != null)
                {
                    Dork dork = treenode.Tag as Dork;
                    if (dork != null)
                    {
                        IScanProvider  scanProvider = new ScanGoogleProvider();
                        RequestBuilder req          = new RequestBuilder(scanProvider);

                        string currentRequest = req.getRequest(dork.Query, "", 0);
                        tvwDorks.DoDragDrop(currentRequest, DragDropEffects.Copy);
                    }
                }
            }
        }