Tuesday, 21 July 2015

Java is Javascript (with demonstration and files)

Yes it's true, i can show you that is actually true.
JavaScript and Java are the same thing.
This will demonstrate that I'm not joking.
This is the output if executed with Java.

This is the output if opened with Firefox.

Yes, it's the same thing, so STOP saying that Java is NOT JavaScript.

These are the files i used to build that! [ZIP] JavaJS.zip

Sunday, 19 April 2015

Release - South Park Unofficial

Hi, this is my first Addon i hope you will like it!

  • Ability to play all the South Park content from southpark.cc.com and southpark.de.
  • Ability to play a random episode.
  • Ability to see the featured episodes.
  • German/English audio support (Spanish support will be available soon)

Download and Install:
You can manually download and then install the add-on from https://github.com/wargio/plugin.video.s...master.zip
Change your language from the addon settings

  • all

Release History:
  • 0.1.0 - Initial version
  • 0.1.3 - added langs and fixed geolocation
  • 0.2.1 - added support to southpark.de

  • Add addon translation
  • Search
  • Add the spanish language to the script (they added it today: 04/17/2015)



Wednesday, 18 February 2015

Homemade Weather Station [PT 1]

This time i've decided to build an homemade weather station.

I've ordered a month ago a few Dallas DS18B20 one wire digital thermometer and a welded DHT11 (Hygrometer + Thermometer) from an eshop. When i started this project i forgot to buy some matrix boards so i took some really old broken boards (they were mostly old FM radio) and i have unwelded the components. After some PCB modifications i used the old board to weld the DS18B20 with a 4.7K resistor and 3 old cables got from an old (and broken) PC.

I took an old Liquorice metal box and i've isolated the components with the wire tape.

While i was searching for boards, i found an old mini engine for a model railway locomotive and welded it with 2 cables. My future plan for this engine is to use it as an Anemometer.

What's next? Well i found also a solar panel from a broken Chinese calculator (those given as gadgets in the fairs) and i've decided to use it to get the light intensity, but since i have also a photoresistor, i'll probably use both to check the light. The Anemometer (aka the engine) ,the solar panel and the photoresistor will be attached to a MCP3008 (an 8 channel ADC that i got for free).
Photoresistor  |  MCP3008 | 3.3V Solar panel
Now i'm waiting for some components like my Arduino nano v3.0 and some other parts like the raindrops sensor.

For now i've spent less then €2 (less then €1 for the DHT11, €1 for 2 DS18B20).
To test the components (for now) i've used my raspberry pi and my HD44780.

Saturday, 20 September 2014

Raspberry PI + YwRobot Arduino LCM1602 IIC V1 HD44780 LCD

Finally i have some time to write a new post.

Let's start:
I bought a YwRobot Arduino LCM1602 IIC V1 HD44780 LCD from amazon for 6,57 €

It has a I2C interface (so it will use just 2 cables, SDA & SCL, + 2 for VCC & GND).

I found some tutorials online, but they were for Arduino or python... NOTHING FOR C!!
So i decided to write a damn C lib for this component.
I had to cross check various codes/datasheets to understand how it works, but at the end i wrote it.
So, this is my lib! Enjoy it ;)
You can grab from the link at the end of the post.

    #include "stdio.h"  
    #include "string.h"  
    #include "i2c.h"  
    #include "lcd.h"  
    #define I2C_FILE_NAME "/dev/i2c-0"  
    const char* txt[]  = {  
        "I work on the PI",  
        "via liblcm1602.a"  
    int main(){  
        int i2c_dev;  
        lcd lcd0;  
        // 0x27 is the address of the i2c device  
        i2c_dev = open_i2c(I2C_FILE_NAME, 0x27);  
        if(i2c_dev <0){  
           printf("Error: %d\n", i2c_dev);  
           return 1;  
        lcd_init(&lcd0, i2c_dev);  
        lcd_print(&lcd0, txt[0], strlen(txt[0]), 0);  
        lcd_print(&lcd0, txt[1], strlen(txt[1]), 1);  
        return 0;  

Wednesday, 9 July 2014

Just a simple shell disassembler for ppc64 elfs

I had more the an hour and i decided to write a concept of shell disassembler for the ppc64 elfs, and i used capstone disassembler (capstone [git])

this was the result:

An advice: DO NOT USE MY CODE! it's buggy and has errors!

[Download][git] https://github.com/wargio/disassemble_ppc64

Tuesday, 14 January 2014

Reversing Wii U Executables

First thing to say, Wii U uses Executable and Linkable Format (ELF) with dynamic linking (since Wii U has a real OS), but they are different from the normal ones:

  • Wii U libraries are called RPL
  • Wii U executables are called RPX, but these are actually RPL.
The only difference between RPX and RPL is that the first one has the main entry point, but both are ELFs.Ok, so this is what i understood about the header:
/* Total size 0x500 -> elf + section table */
typedef struct __cafe_elf {
 uint8_t  e_ident[0x10]; // {0x7f,0x45,0x4c,0x46, <-- 'elf'
       // 0x01,     <-- one
       // 0x01,0x05,    <-- sdk version ?
       // 0xca,0xfe,    <-- 0xcafe
       // 0x00,0x00, ... ,0x00} 
 uint16_t e_type;  // 0xfe01 = rpl
 uint16_t e_machine;  // 0x0014 PPC
 uint32_t e_version;  // 0x00000001
 uint32_t e_entry;  // 0x02000000
 uint32_t e_phoff;  // 0x00000000
 uint32_t e_shoff;  // 0x00000040
 uint32_t e_flags;  // 0x00000000
 uint16_t e_ehsize;  // 0x0032 (54)
 uint16_t e_phentsize; // 0x0000
 uint16_t e_phnum;  // 0x0000
 uint16_t e_shentsize; // 0x0028 (40)
 uint16_t e_shnum;  // 0x0015 (19)
 uint16_t e_shstrndx; // 0x0012 (16)
 uint8_t  _pad[0xC];  // zero filled
 uint8_t  zero[0x28]; // zero filled
 uint32_t one_0;   // 0x00000001
 uint32_t one_1;   // 0x00000001
} cafe_elf;

typedef struct __cafe_elf_section_tbl {
 uint32_t flags;  // 0x08000006 <-- example
      // 0x08000000 <-- z
      // 0x00000001 <-- w
      // 0x00000002 <-- a
      // 0x00000004 <-- x
 uint32_t address; // 0x02000000 <-- memory addr (.text)
 uint32_t offset; // 0x0019D740 <-- file offset
 uint32_t size;  // 0x00003EC8 <-- compressed size
 uint32_t data0;  // 0x00000000 <-- unknown
 uint32_t data1;  // 0x00000000 <-- unknown
 uint32_t align;  // 0x00000020 (32) <-- data align
 uint32_t data3;  // 0x00000000 <-- unknown
 uint32_t data4;  // 0x00000007 <-- unknown
 uint32_t data5;  // 0x80000001 <-- unknown
} cafe_elf_section_tbl;
Each section is compressed through ZLIB and has this structure:
typedef struct __cafe_elf_section_data {
 uint32_t decompressed_size;
 uint16_t zlib_compression_hdr;
 uint8_t data[];
} cafe_elf_section_tbl;

Sunday, 20 October 2013

Twitch Streamer for Linux

This Screenshot comes from a linux streaming session.

Since my friend asked me to help him to stream on twitch.tv from linux, i've decided to write something really user-friendly that can be used by everyone. so here it is: Twitch-Streamer-Linux (github)
This little script allows you to stream on Twitch like the non-free apps on windows. You can choose the quality and if stream with the webcam or not.

There is an HOW-TO on the Readme (LINK). if you have any question, just write here or on github.

have fun!


i have added also some flags to get "Excellent" as quality on Twitch. now works as good as non-free programs :D