Code Monkey home page Code Monkey logo

zsun_fun's Introduction

zsun_fun

This all is only about reverse engineering the existing stock firmware of the Zsun Wi-Fi USB 2.0 Card Reader

git clone --recursive https://github.com/markuman/zsun_fun or do git submodule update --init --recursive when the repository isn't cloned recursively.

instruction - cross compiling

This will crosscompile Lua for (no openwrt required, but maybe recommanded).

clone this repository and run the mips_cross.sh script. It will build the toolchain and crosscompile Lua. Finally copy the new lua and luac binary to your ZSUN device.

$ file lua
lua: ELF 32-bit MSB executable, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked, interpreter /lib/ld-uClibc.so.0, not stripped
  • mips32r2
  • binutils 2.23
  • gcc 4.7
  • ulibc 0.9.33
  • kernel headers 3.2.73

webs_replacement

to build, just do in your toolchain environment:

mips-buildroot-linux-uclibc-gcc -Idyad/src/ dyad/src/dyad.c webs_replacement.c -o webs_replacement

webs_replacement is not a replacement of /var/webs/webs, but it will reply the url paths which the Android App is calling on different actions.

known urls

  • 10.168.168.1:8080/goform/Getcardmode
  • 10.168.168.1:8080/goform/Getcardstatus
  • 10.168.168.1:8080/goform/getWdsStatus
  • 10.168.168.1:8080/goform/GetDeviceWifiMacAddress
  • 10.168.168.1:8080/goform/Getproductinfo
  • 10.168.168.1:8080/goform/Getssid
  • 10.168.168.1:8080/goform/Setcardworkmode?workmode=0
  • 10.168.168.1:8080/goform/upFirmWare
  • 10.168.168.1:8080/goform/getFlashSize
  • 10.168.168.1:8080/goform/Getmac

ZSUN Specs

  • AR9331 SoC

  • 64MB RAM

  • 16MB SPI Flash

  • GL827L USB SD Card Reader

      ~ # cat /proc/cpuinfo
      cat /proc/cpuinfo
      system type             : Atheros AR9330 (Hornet)
      processor               : 0
      cpu model               : MIPS 24Kc V7.4
      BogoMIPS                : 266.24
      wait instruction        : yes
      microsecond timers      : yes
      tlb_entries             : 16
      extra interrupt vector  : yes
      hardware watchpoint     : yes, count: 4, address/irw mask: [0x0000, 0x0008, 0x0020, 0x0800]
      ASEs implemented        : mips16
      shadow register sets    : 1
      core                    : 0
      VCED exceptions         : not available
      VCEI exceptions         : not available
    

Stock Software

BusyBox v1.01 (2014.12.27-02:50+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ # uname -a
uname -a
Linux (none) 2.6.31--LSDK-9.2.0_U11.14 #1 Wed Dec 17 15:53:04 CST 2014 mips unknown
~ # php-cgi -v
php-cgi -v
PHP 5.2.9 (cgi-fcgi) (built: Dec 19 2014 14:08:05)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
~ # lighttpd -v
lighttpd -v
lighttpd-1.4.15 - a light and fast webserver
Build-Date: Dec 19 2014 14:05:57

go for more

zsun_fun's People

Contributors

markuman avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.