mirror of
https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks.git
synced 2025-09-03 05:02:40 +02:00
Added cURL for later uploading purposes and cleaned network.cgi to don't show the xiaofang-hacks specific information
This commit is contained in:
3
firmware_mod/bin/curl
Normal file
3
firmware_mod/bin/curl
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
LD_LIBRARY_PATH='/thirdlib:/system/lib:/system/sdcard/lib'
|
||||
/system/sdcard/bin/curl.bin "$@"
|
BIN
firmware_mod/bin/curl.bin
Normal file
BIN
firmware_mod/bin/curl.bin
Normal file
Binary file not shown.
BIN
firmware_mod/lib/libcrypto.so.42
Normal file
BIN
firmware_mod/lib/libcrypto.so.42
Normal file
Binary file not shown.
BIN
firmware_mod/lib/libssl.so.44
Normal file
BIN
firmware_mod/lib/libssl.so.44
Normal file
Binary file not shown.
BIN
firmware_mod/lib/libz.so.1
Normal file
BIN
firmware_mod/lib/libz.so.1
Normal file
Binary file not shown.
@@ -4,7 +4,7 @@ echo "Content-type: text/html"
|
||||
echo ""
|
||||
source func.cgi
|
||||
if [ -e "/etc/fang_hacks.cfg" ]; then source /etc/fang_hacks.cfg; fi
|
||||
PATH="/bin:/sbin:/usr/bin:/media/mmcblk0p2/data/bin:/media/mmcblk0p2/data/sbin:/media/mmcblk0p2/data/usr/bin"
|
||||
PATH="/bin:/sbin:/usr/bin:/system/bin"
|
||||
|
||||
CFG_MODE="${NETWORK_MODE:-0}"
|
||||
CFG_CLIENT="/media/mmcblk0p2/data/etc/wpa_supplicant.conf"
|
||||
@@ -247,7 +247,7 @@ window.onload = onLoad;
|
||||
<button title='Reboot the device' type='button' onClick="window.location.href='action.cgi?cmd=reboot'">Reboot</button>
|
||||
<button title='Info' type='button' onClick="window.location.href='scripts.cgi'">Scripts</button>
|
||||
<button title='View /tmp/hacks.log' type='button' onClick="window.location.href='action.cgi?cmd=showlog'">View log</button>
|
||||
<hr/>
|
||||
<!-- <hr/>
|
||||
<div style='clear: both;'><pre>$ACTION_MSG</pre></div>
|
||||
<div style='clear: both;'>
|
||||
<fieldset style='display: inline-block;'>
|
||||
@@ -327,51 +327,51 @@ if [ "$DISABLE_CLOUD" -eq 1 ]; then
|
||||
echo "If you apply this mode network.cgi will NOT be initialized after reboot!"
|
||||
echo "</span>"
|
||||
fi
|
||||
echo "<hr/>"
|
||||
echo "<hr/> "
|
||||
|
||||
echo "<div style='float: left'>"
|
||||
echo "<form name='network.cgi-info'>"
|
||||
echo "Cloud WiFi Settings:<br/>"
|
||||
echo "<label for='cloud_ssid' style='display: inline-block; width: 8em'>Network SSID:</label>"
|
||||
echo "<input id='cloud_ssid' value='$(cat /etc/config/.wifissid)' type='text'/><br/>"
|
||||
echo "<label for='cloud_key' style='display: inline-block; width: 8em'>Passphrase:</label>"
|
||||
echo "<input id='cloud_key' value='$(cat /etc/config/.wifipasswd)' type='text'/>"
|
||||
echo "</form></div>"
|
||||
cat << EOF
|
||||
</fieldset>
|
||||
</div> <!-- cloud-pnl -->
|
||||
<div id='ap-pnl' style='display: none'>
|
||||
<fieldset style='display: inline-block'>
|
||||
<legend>Access Point</legend>
|
||||
Create a Wireless Hotspot.<br/>
|
||||
EOF
|
||||
echo "<hr/>"
|
||||
ap_addr="$(cat $CFG_DHCPD | grep ^opt.*router | awk '{print $3}')"
|
||||
ap_ssid="$(cat $CFG_AP | grep ^ssid= | cut -d'=' -f2)"
|
||||
ap_key="$(cat $CFG_AP | grep ^wpa_passphrase= | cut -d'=' -f2)"
|
||||
echo "<div style='float: left'>"
|
||||
echo "<form name='network.cgi-info'>"
|
||||
echo "Hotspot settings:<br/>"
|
||||
echo "<label for='ap_addr' style='display: inline-block; width: 8em'>IP Address:</label>"
|
||||
echo "<input id='ap_addr' value='$ap_addr' type='text' disabled title='You must manually edit configs to change addressing!'/><br/>"
|
||||
echo "<label for='ap_ssid' style='display: inline-block; width: 8em'>Network SSID:</label>"
|
||||
echo "<input id='ap_ssid' value='$ap_ssid' type='text'/><br/>"
|
||||
echo "<label for='ap_key' style='display: inline-block; width: 8em'>Passphrase:</label>"
|
||||
echo "<input id='ap_key' value='$ap_key' type='text'/><br/>"
|
||||
echo "</form></div>"
|
||||
|
||||
cat << EOF
|
||||
</fieldset>
|
||||
</div> <!-- ap-pnl -->
|
||||
<hr/>
|
||||
<button type='button' id='btn_apply' disabled onClick="apply_config()">Apply</button>
|
||||
<hr/>
|
||||
Information:
|
||||
<pre>Interfaces:<br/>$(ifconfig; iwconfig)</pre>
|
||||
<pre>Routes:<br/>$(route)</pre>
|
||||
<pre>DNS:<br/>$(cat /etc/resolv.conf)</pre>
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
||||
|
||||
|
||||
echo "<label for='cloud_ssid' style='display: inline-block; width: 8em'>Network SSID:</label>"
|
||||
echo "<input id='cloud_ssid' value='$(cat /etc/config/.wifissid)' type='text'/><br/>"
|
||||
echo "<label for='cloud_key' style='display: inline-block; width: 8em'>Passphrase:</label>"
|
||||
echo "<input id='cloud_key' value='$(cat /etc/config/.wifipasswd)' type='text'/>"
|
||||
echo "</form></div>"
|
||||
cat << EOF
|
||||
</fieldset>
|
||||
</div> <!-- cloud-pnl -->
|
||||
<div id='ap-pnl' style='display: none'>
|
||||
<fieldset style='display: inline-block'>
|
||||
<legend>Access Point</legend>
|
||||
Create a Wireless Hotspot.<br/>
|
||||
EOF
|
||||
echo "<hr/>"
|
||||
ap_addr="$(cat $CFG_DHCPD | grep ^opt.*router | awk '{print $3}')"
|
||||
ap_ssid="$(cat $CFG_AP | grep ^ssid= | cut -d'=' -f2)"
|
||||
ap_key="$(cat $CFG_AP | grep ^wpa_passphrase= | cut -d'=' -f2)"
|
||||
echo "<div style='float: left'>"
|
||||
echo "<form name='network.cgi-info'>"
|
||||
echo "Hotspot settings:<br/>"
|
||||
echo "<label for='ap_addr' style='display: inline-block; width: 8em'>IP Address:</label>"
|
||||
echo "<input id='ap_addr' value='$ap_addr' type='text' disabled title='You must manually edit configs to change addressing!'/><br/>"
|
||||
echo "<label for='ap_ssid' style='display: inline-block; width: 8em'>Network SSID:</label>"
|
||||
echo "<input id='ap_ssid' value='$ap_ssid' type='text'/><br/>"
|
||||
echo "<label for='ap_key' style='display: inline-block; width: 8em'>Passphrase:</label>"
|
||||
echo "<input id='ap_key' value='$ap_key' type='text'/><br/>"
|
||||
echo "</form></div>"
|
||||
|
||||
cat << EOF
|
||||
</fieldset>
|
||||
</div> <!-- ap-pnl -->
|
||||
<hr/>
|
||||
<button type='button' id='btn_apply' disabled onClick="apply_config()">Apply</button>
|
||||
<hr/> -->
|
||||
Information:
|
||||
<pre>Interfaces:<br/>$(ifconfig; iwconfig)</pre>
|
||||
<pre>Routes:<br/>$(route)</pre>
|
||||
<pre>DNS:<br/>$(cat /etc/resolv.conf)</pre>
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user