masterzorag's Activity

Thursday, January 12, 2017

bf_new, open

Simpler, faster (about 30M/sec on my junk), minimal, portable and more advanced:
bruteforge is being rewritten from scratch, but this time goes live, in the wild.

I'll use repo's included wiki to spot some notes or howtos, meanwhile 💟 it.

Tuesday, February 23, 2016

Ride on java Application Servers

I'm an opensource entusiast, we can test everything for free, you just need background and skills

want to digg into the Java Application Server(s) world? Just test/run two of them:
* Red Hat developed JBoss AS, currently Wildfly;
* free solutions exists like Apache Tomcat.


My Host machine is a Gentoo x86_64 and I don't want flood my setup with tons of dependences, so just fire up Oracle Virtualbox and setup a minimal Virtual Machine to install Fedora 23



Here I have assigned just 768 MB of RAM and installed the Server flavour
This VM it's bridged to my wlan1 gentoo host and:
* can be accessed via RDP by VirtualBox itself on guest network issue
* can be accessed via sshd, running by default
* it have Docker service disabled by default

Apache Tomcat
* installed directly on guest OS via dnf
* adjusted config
* deployed a sample
Tomcat is running on port 8080



This time to test the "Docker images and container stuff" then, run JBoss AS in a container!

* disabled new firewalld default service and back to iptables
* enabling service
* building an image with JBoss AS with management console
* deployed a sample



Wildfly is running on port 8090



 Of curse, the issue in this proof of concept test IS that:
"I'm running Docker container into a Virtual Machine."

more about Docker concept


Sunday, May 3, 2015

X-BitMap fonts

Was looking at a raw C way to print to screen painting by pixel (to raw framebuffers) when, evaluating conversion from TrueTypeFont to a well suited, handy format I faced X-BitMaps images.

So, I've spended some bytes writing a script that convert an ASCII code range of ttf labels into xbm glyphs: genXBMfonts uses ImageMagick's convert tool to write single 16x16 pixel, 1bpp XBM images, as C header of 32 chars.

xbm_dump called by genXBMfonts, (XBM is an image)
After that, I can copy my definition header in my project, and without the need of external library to include I can address text to glyph bits[], decode back (bit)checking and print text addressing the destination pixel:
 
When painting on raw framebuffer we have control on color, as well.
initiated public repository: https://github.com/masterzorag/xbm_tools

About portability, this is a sample psl1ght app including the same C header definition, running on the ps3:

Tuesday, August 6, 2013

vaapi on fglrx

Just to test if we can get finally some sort of hardware accelerated decoding on AMD/ATI, I've tested a H264 video without any issue, here some from /var/log/Xorg.0.log:
[ 26.252] (II) Module fglrx: vendor="FireGL - AMD Technologies Inc."
[ 26.274] (II) Module fglrxdrm: vendor="FireGL - AMD Technologies Inc."
[ 26.274] (II) AMD Proprietary Linux Driver Version Identifier:12.10.05
[ 26.274] (II) AMD Proprietary Linux Driver Release Identifier: 12.104
[ 26.274] (II) AMD Proprietary Linux Driver Build Date: Mar 28 2013 21:07:22
[ 27.273] (--) Chipset Supported AMD Graphics Processor (0x9802) found
[ 27.277] (II) AMD Video driver is running on a device belonging to a group targeted for this release
[ 27.282] (II) AMD Video driver is signed
[ 27.302] (II) Module fglrxdrm: vendor="FireGL - AMD Technologies Inc."
[ 27.308] (**) fglrx(0): AMD 2D Acceleration Architecture enabled
[ 27.308] (--) fglrx(0): Chipset: "AMD Radeon HD 6310 Graphics" (Chipset = 0x9802)
[ 27.589] (II) fglrx(0): Adapter AMD Radeon HD 6310 Graphics has 2 configurable heads and 1 displays connected.
[ 27.591] (II) fglrx(0): doing swlDriScreenInit
[ 27.591] (II) fglrx(0): swlDriScreenInit for fglrx driver
[ 27.591] (II) fglrx(0): [uki] DRM interface version 1.0
[ 27.591] (II) fglrx(0): [uki] created "fglrx" driver at busid "PCI:0:1:0"
[ 27.591] (II) fglrx(0): [uki] added 8192 byte SAREA at 0x2000
[ 27.592] (II) fglrx(0): [uki] mapped SAREA 0x2000 to 0xb65bd000
[ 27.592] (II) fglrx(0): [uki] framebuffer handle = 0x3000
[ 27.592] (II) fglrx(0): [uki] added 1 reserved context for kernel
[ 27.592] (II) fglrx(0): swlDriScreenInit done
[ 27.592] (II) fglrx(0): Kernel Module Version Information:
[ 27.592] (II) fglrx(0): Name: fglrx
[ 27.592] (II) fglrx(0): Version: 12.10.5
[ 27.592] (II) fglrx(0): Date: Mar 28 2013
[ 27.592] (II) fglrx(0): Desc: AMD FireGL DRM kernel module
[ 27.592] (II) fglrx(0): Kernel Module version matches driver.
[ 27.592] (II) fglrx(0): Kernel Module Build Time Information:
[ 27.592] (II) fglrx(0): Build-Kernel UTS_RELEASE: 3.10.4
[ 27.592] (II) fglrx(0): Build-Kernel MODVERSIONS: yes
[ 27.592] (II) fglrx(0): Build-Kernel __SMP__: yes
[ 27.592] (II) fglrx(0): Build-Kernel PAGE_SIZE: 0x1000
[ 27.592] (II) fglrx(0): [uki] register handle = 0x00004000
[ 27.592] (II) fglrx(0): OpenGL overlay is disabled on non-FIREGL Board.
[ 27.602] (II) fglrx(0): Static shadow buffer initialized.
[ 27.611] (II) fglrx(0): DRI initialization successfull
[ 27.628] (II) fglrx(0): FBADPhys: 0x10600000 FBMappedSize: 0x00816000
[ 27.645] (II) fglrx(0): Initialized in-driver Xinerama extension
[ 27.782] (II) fglrx(0): GLESX enableFlags = 848
[ 27.783] (II) fglrx(0): GLESX is enabled
[ 27.814] Loading extension AMDXVOPL
[ 27.814] Loading extension AMDXVBA
[ 27.827] (II) fglrx(0): UVD feature is enabled(II) fglrx(0):
[ 27.831] (II) fglrx(0): Enable composite support successfully
[ 27.832] (II) fglrx(0): X context handle = 0x1
[ 27.832] (II) fglrx(0): [DRI] installation complete
[ 27.833] (II) fglrx(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[ 27.987] (WW) fglrx(0): Framebuffer compression is disabled by the driver: Video Ram = 262144 kByte
then libva, output of vainfo:
libva info: VA-API version 0.33.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/va/drivers/fglrx_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.33 (libva 1.1.1)
vainfo: Driver version: Splitted-Desktop Systems XvBA backend for VA-API - 0.8.0
vainfo: Supported profile and entrypoints
VAProfileH264High : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
last, vaapi-mplayer
play:
./mplayer -vo vaapi ../h264_1080p_hp_4.1_40mbps_birds.mkv
MPlayer SVN-r36265-4.6.3 (C) 2000-2013 MPlayer Team

Playing ../h264_1080p_hp_4.1_40mbps_birds.mkv.
libavformat version 55.13.102 (internal)
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
VIDEO: [H264] 1920x1072 0bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
Load subtitles in ../
libva info: VA-API version 0.33.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/va/drivers/fglrx_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 55.20.100 (internal)
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Audio: no sound
Starting playback...
[VD_FFMPEG] Trying pixfmt=0.
[VD_FFMPEG] XVMC-accelerated MPEG-2.
Movie-Aspect is 1.79:1 - prescaling to correct movie aspect.
VO: [vaapi] 1920x1072 => 1920x1072 H.264 VA-API Acceleration
[VD_FFMPEG] XVMC-accelerated MPEG-2.
[VD_FFMPEG] Trying pixfmt=0.
[VD_FFMPEG] XVMC-accelerated MPEG-2.
[VD_FFMPEG] XVMC-accelerated MPEG-2.
Movie-Aspect is 1.79:1 - prescaling to correct movie aspect.
VO: [vaapi] 1920x1072 => 1920x1072 H.264 VA-API Acceleration
xvba_video: XVBA_DestroySurface(): status 2


Exiting... (Quit)

Video plays flawless (over compiz!), CPU is offloaded from decoding


With Mesa 9.2 we can test also the radeon kernel module + gallium instead of fglrx with libva, but I've not tried yet.

Friday, October 26, 2012

Priorities

busy with many stuff, random list:
no ps3, no OpenCL
no code, no bruteforge
badblock, e2fsck, mkfs.ext4, dumpe2fs and a couple of HDD to recover
OpenCL:
code aes-cbc-256
test AMD E2-1800 and E350/ATI6310
Meanwhile...
laptop become headless: recover work and use it as a server
ssh, sshfs, x11 forwarding, rdp
PPC64:
virtualization

* Here is how I've recovered a corrupted HDD and use it as EXT4 *

# unmount device, at first
umount /dev/sdc1

1*
# read about checking program
e2fsck
...
-v verbose
-d debugging output
-c call badblocks to add newly badblocks to blacklisted list
-k When combined with the -c option, any existing bad blocks in the bad blocks list are preserved, and any new bad blocks found by running badblocks(8) will be added to the existing bad blocks list.

e2fsck -v -d -c -k /dev/sdc1
# this method should work, but I'm used to do my own, so go deeper:

2*
# know the blocksize and pass it at every tool, here 4096

# read and write the badblock list, get total
dumpe2fs -b -o blocksize=4096 /dev/sdc1 > badlist
wc -l badlist

# scan for badblocks, skipping already known in badlist
badblocks -b 4096 -s -v -o badblocks.out -i badlist /dev/sdc1

# manually add badblocks
e2fsck -B 4096 -v -d -k -l badblocks.out /dev/sdc1
# verify
e2fsck -B 4096 -v -d -f /dev/sdc1

# badblocks count should reflect wc output:
dumpe2fs -b -o blocksize=4096 /dev/sdc1 > total_badblock
wc -l total_badblock

# format passing the badblock list, large_file needs CONFIG_LBDAF into kernel
mkfs.ext4 -l total_badblock -b 4096 -m 0 -O dir_index,extent,large_file,sparse_super,flex_bg -v /dev/sdc1

# (manually excluding large_file and huge_file can be done at format time as this:)
# mkfs.ext4 ... -O ^large_file,^huge_file ...

# once you've done, mount your device.
# as usual, reading man pages can help you a lot!