Valid Request?

Send http request to server is simple?

1. Soft input: can modified
Request headers send to server

1.1. User-Agent
The User-Agent request header is a characteristic string that lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent.

User-Agent: <product> / <product-version> <comment>

Some site will show different sources for different "user-agents"

Updating: TLS cipher with https request....
1.2. Referer
The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.

Note that referer is actually a misspelling of the word "referrer".

A Referer header is not sent by browsers if:
  • The referring resource is a local "file" or "data" URI.
  • An unsecured HTTP request is used and the referring page was received with a secure protocol (HTTPS).
Some site will show different sources for different "referer"
Example:
site A can block other sites except site B when insert HTML code:
<iframe src="A"></iframe>
server A need check request headers "referer" to detect site B

1.3. Cookie
The Cookie HTTP request header contains stored HTTP cookies previously sent by the server with the Set-Cookie header.


The Cookie header is optional and may be omitted if, for example, the browser's privacy settings block cookies.
SyntaxSyntax:
Cookie: <cookie-list>
<cookie-list>
A list of name-value pairs in the form of <cookie-name>=<cookie-value>. Pairs in the list are separated by a semicolon and a space ('; ').

Some site will show different sources for different "cookie"

Extension "EditThisCookie" can help you debug cookie on the site

2. Hard input: can not modified
Some site will show different sources for different "IP of request"

HTTP headers request X-Forwarded-For ???
The X-Forwarded-For (XFF) header is a de-facto standard header for identifying the originating IP address of a client connecting to a web server through an HTTP proxy or a load balancer. When traffic is intercepted between clients and servers, server access logs contain the IP address of the proxy or load balancer only. To see the original IP address of the client, the X-Forwarded-For request header is used.
Some servers may misunderstand ip(of request) with header "X-Forwarded-For" but not all.

The tutorial does not show how to fake ip.
2.1. Use proxy server


In computer networking, a proxy server is a server application or appliance that acts as an intermediary for requests from clients seeking resources from servers that provide those resources. A proxy server thus functions on behalf of the client when requesting service, potentially masking the true origin of the request to the resource server.

Instead of connecting directly to a server that can fulfill a requested resource, such as a file or web page for example, the client directs the request to the proxy server, which evaluates the request and performs the required network transactions. This serves as a method to simplify or control the complexity of the request, or provide additional benefits such as load balancing, privacy, or security. Proxies were devised to add structure and encapsulation to distributed systems.

If you want stability and long-term, you have to buy proxy server...

2.2. Refresh Ip Tethering with ADB tool
Tethering ??
https://en.wikipedia.org/wiki/Tethering

Android Debug Bridge (adb) ???
https://developer.android.com/studio/command-line/adb (or Stetho)

[require driver: Universal ADB Drivers]

Idea: Toggle airplane mode with abd and "Child Process" Node.js
var a= 'adb shell settings put global airplane_mode_on 1 && adb shell am broadcast -a android.intent.action.AIRPLANE_MODE && adb shell settings put global airplane_mode_on 0 && adb shell am broadcast -a android.intent.action.AIRPLANE_MODE';
const util = require('util');
const exec = util.promisify(require('child_process').exec);

async function cmdsExample() {
  const { stdout, stderr } = await exec(a);
  console.log('stdout:', stdout);
  console.error('stderr:', stderr);
}
cmdsExample();
Simultaneously: USB debugging and Share internet connection
Turning airplane mode on via ADB?
https://stackoverflow.com/questions/10506591/turning-airplane-mode-on-via-adb/40271379



Please wait next!


Comments