lundi 25 décembre 2017

Web server from home without paralyzing internet at home

I'm looking for a way to run a simple web server that will be accessible from "outside web" from my home. I somewhat understand what I have to do, but my problem is that I can't give up my entire port 80 by port-forwarding, because I still need to use internet normally on the same network. Is there any solution that could help me?

Sorry if I'm not clear, I really don't know how to explain it.
Thanks in advance.




c# FiddlerCore AutoResponder Tunnel Connection Failed

So im trying to get basically the same functionality as the "AutoResponder" inside the Fiddler app.

also i need this to work offline.

the website im trying to autorespond for it HTTP(S) i put in code to ask the user to Trust the Root Certificate which i have included below incase its somehow relevant.

            if (Fiddler.CertMaker.rootCertExists())
        {
            if (!Fiddler.CertMaker.rootCertIsTrusted())
            {
                MessageBox.Show(this, "You need to approve the Fiddler Root CA.", "First Time?");
                Fiddler.CertMaker.trustRootCert();
            }

        }
        else
        {
            Fiddler.CertMaker.createRootCert();
            if (!Fiddler.CertMaker.rootCertIsTrusted())
            {
                MessageBox.Show(this, "You need to approve the Fiddler Root CA.", "First Time?");
                Fiddler.CertMaker.trustRootCert();

            }
        }

        if (!Fiddler.CertMaker.rootCertIsTrusted())
        {
            MessageBox.Show(this, "Fiddler Root CA not Trusted.", "Error");
            this.Close();
        }

As for the autoresponder (and what im pretty sure is causing the problem)

 FiddlerApplication.Startup(8080, true, true, true);



        FiddlerApplication.BeforeRequest += delegate (Session session)
        {
            if (session.HTTPMethodIs("CONNECT")) { session.oFlags["X-ReplyWithTunnel"] = "Fake for HTTPS Tunnel"; return; }
            if (session.uriContains("https://google.com"))
            {
                session.bBufferResponse = true;
            }
        };

        FiddlerApplication.BeforeResponse += delegate (Session session)
        {
            session.utilDecodeResponse();
            session.LoadResponseFromFile("Google.txt");
        };

However after running this code i cannot access any HTTPS websites and receive the error "ERR_TUNNEL_CONNECTION_FAILED" even on the website im trying to AutoRespond to.




How to check the StatusCode in json object to get a string of httpResponse rest API

I can't check StatusCode when REST API and parse JObject

code

string jsonResponse = HttpRequest(HostAPI, "POST", paramModel);
JObject jsonObject = JObject.Parse(jsonResponse);
if (jsonObject["data"] != null && jsonObject["StatusCode"]==200)  ????

jsonResponse

{"data":[{"OBJID":1012540462,"SUPID":1041252952,"STATUSPTC":1.0,"DATEACTIVESUP":0.0}],"StatusCode":200}

Please help me if you know ???




dimanche 24 décembre 2017

How to find Email in Jsoup scraping

jsoup is a Java library for working with real-world HTML. It provides a very convenient API for extracting and manipulating data, using the best of DOM, CSS, and jquery-like methods. I am not able to find out Email

  try {
    pageDocument = Jsoup.connect(url).get();
    } catch (IOException e) {
    e.printStackTrace();
   }




Laravel Chat System RESTful API

I spend last days searching on how to develop a chat system API to be use later in Mobiles , I searched a lot and there no clear tutorial that give me the required answer , since I am new on laravel and I can't figure out all the aspects in the laravel and web development , can someone please help me and give me the instruction how to start and what notification system do i need to use Pusher or Firebase Clouding Messaging....




Can not remove base category slug from url on WordPress site

I would be very grateful if you tell me when is my mistake. This is my .htaccess file:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

RewriteRule ^category/shopcategory1/(.*)$ http://ift.tt/2BJLOXD [L,R=301]
RewriteRule ^shopcategory1/$ /category/shopcategory1/ [L]
</IfModule>
# END WordPress

But all the same there is no redirection.




Extracting a table from html file uploaded via FileReader using jquery

I am receiving a file uploaded using FileReader() (e.target.result) from which I need to extract the table. From a normal html file this is easily done with $("table tbody") . Is it possible to apply this on e.target.result without appending it to my document?

I am also open to other methods other than FileReader, but if possible I'd like to use this.