mirror of
https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks.git
synced 2025-09-02 20:52:41 +02:00
Missile Control
This commit is contained in:
BIN
firmware_mod/bin/USBMissileLauncherUtils
Executable file
BIN
firmware_mod/bin/USBMissileLauncherUtils
Executable file
Binary file not shown.
BIN
firmware_mod/lib/libusb-0.1.so.4
Executable file
BIN
firmware_mod/lib/libusb-0.1.so.4
Executable file
Binary file not shown.
BIN
firmware_mod/lib/libusb-1.0.so.0
Executable file
BIN
firmware_mod/lib/libusb-1.0.so.0
Executable file
Binary file not shown.
65
firmware_mod/www/cgi-bin/missile.cgi
Normal file
65
firmware_mod/www/cgi-bin/missile.cgi
Normal file
@@ -0,0 +1,65 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Content-type: text/html"
|
||||
echo ""
|
||||
|
||||
cat << EOF
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Fang Hacks</title>
|
||||
<style type="text/css">
|
||||
body { background-color: #B0E0E6; font-family: verdana, sans-serif; }
|
||||
.err { color: red; }
|
||||
hr { height: 1px; border: 0; border-top: 1px solid #aaa; }
|
||||
button, input[type=submit] { background-color: #ddeaff; }
|
||||
.tbl { border-collapse: collapse; border-spacing: 0;}
|
||||
.tbl th { text-align: left; vertical-align: top; font-weight: bold; padding: 10px 5px; border-style: solid; border-width: 1px; overflow: hidden; word-break: normal; }
|
||||
.tbl td { padding: 10px 5px; border-style: solid; border-width: 1px; overflow: hidden; word-break: normal; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
EOF
|
||||
source header.cgi
|
||||
cat << EOF
|
||||
<br/>
|
||||
<br/>
|
||||
</div>
|
||||
</p>
|
||||
<hr/>
|
||||
<table class='tbl'>
|
||||
<script>
|
||||
function call(url){
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', url, true);
|
||||
xhr.send();
|
||||
}
|
||||
</script>
|
||||
<tr>
|
||||
<th>Missile:</th>
|
||||
<td>
|
||||
<button title="" type="button" onclick="call('missile_cmd.cgi?cmd=-U')"> Up </button>
|
||||
<br>
|
||||
<button title="" type="button" onclick="call('missile_cmd.cgi?cmd=-L')">Left</button>
|
||||
<button title="" type="button" onclick="call('missile_cmd.cgi?cmd=-R')">Right</button>
|
||||
<br>
|
||||
<button title="" type="button" onclick="call('missile_cmd.cgi?cmd=-D')">Down</button>
|
||||
|
||||
|
||||
<button title='' type='button' onClick="call('missile_cmd.cgi?cmd=-F')">Fire</button>
|
||||
</td>
|
||||
<td>
|
||||
<button title='' type='button' onClick="call('missile_cmd.cgi?cmd=-F')">Fire</button>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
10
firmware_mod/www/cgi-bin/missile_cmd.cgi
Normal file
10
firmware_mod/www/cgi-bin/missile_cmd.cgi
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
source func.cgi
|
||||
export LD_LIBRARY_PATH=/system/sdcard/lib
|
||||
CMD=$F_cmd
|
||||
|
||||
|
||||
/system/sdcard/bin/USBMissileLauncherUtils $CMD -S 200
|
||||
|
||||
echo "Content-type: text/html"
|
||||
echo ""
|
Reference in New Issue
Block a user