Skip to content

Instantly share code, notes, and snippets.

Michael Zhilin mizhka

  • NetCracker
  • Moscow
Block or report user

Report or block mizhka

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mizhka
mizhka / sysctl-tunables
Created Jun 4, 2019
FreeBSD 13-GENERIC-CURRENT tunables
View sysctl-tunables
kern.maxproc: Maximum number of processes
kern.ngroups: Maximum number of supplemental groups a user can belong to
kern.ipc.shm_allow_removed: Enable/Disable attachment to attached segments marked for removal
kern.ipc.shm_use_phys: Enable/Disable locking of shared memory pages in core
kern.ipc.shmall: Maximum number of pages available for shared memory
kern.ipc.shmseg: Number of segments per process
kern.ipc.shmmni: Number of shared memory identifiers
kern.ipc.shmmin: Minimum shared memory segment size
kern.ipc.shmmax: Maximum shared memory segment size
kern.ipc.semaem: Adjust on exit max value
View gist:1256aed0aa535d318cb369407616293d
BUFFALO U-BOOT Ver 1.03
AP93 (ar7240) U-boot
sri
=====================================================================================================================================
TAP CALC (read_cnt=512)
----+--------------------------------------------------------------------------------------------------------------------------------
TAP | 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
----+--------------------------------------------------------------------------------------------------------------------------------
FAIL| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 512 512 512 512 512 512 512 512 512 512 51
View gist:9098edbcc555a3e5fc0fe3b594160155
GOOD:
ar7240> erase 0xbf040000 +0x160000
Erase Flash from 0xbf040000 to 0xbf19ffff in Bank # 1
First 0x40 last 0x19f sector size 0x1000
400
Erased 352 sectors
ar7240> cp.b 0x81000000 0xbf040000 0x160000
Copy to Flash...
Copy 1441792 byte to Flash... write addr: bf040000
@mizhka
mizhka / gist:0e1461c360b133d526ebe0854635cf44
Created May 20, 2019
WHR-300 FreeBSD firmware - entropy
View gist:0e1461c360b133d526ebe0854635cf44
% binwalk -E whr300-tftp-noheader.bin
WARNING: Failed to import pyqtgraph module, visual entropy graphing will be disabled
DECIMAL HEXADECIMAL ENTROPY
--------------------------------------------------------------------------------
0 0x0 Rising entropy edge (0.985684)
1392640 0x154000 Falling entropy edge (0.000000)
1443840 0x160800 Rising entropy edge (0.989380)
3745792 0x392800 Falling entropy edge (0.693819)
View gist:f497f8ca7121087577d94d5b10d7f3d7
dig, host - fetches DNS information
fuser - displays the PIDs of processes using the specified files or file systems.
gcore - generate a core file of a running program
gdb - allow you to see what is going on ''inside'' another program / coredump
iotop - watches I/O usage information output and displays a table of current I/O usage by processes or threads on the system
lftp - a file transfer program that allows sophisticated ftp, http and other connections to other hosts (including parallel transfer)
lsof - lists on its standard output file information about files opened by processes
nc - networking utility for reading from and writing to network connections using TCP or UDP
nmon - a huge amount of important performance information in one go
pbzip2 - a parallel implementation of the bzip2 block-sorting file compressor that uses pthreads and achieves near-linear speedup on SMP machines
@mizhka
mizhka / gist:d26481c21ceaab93516ad73842ce70b6
Created May 14, 2019
Poor Man FreeBSD DDB stacktraces
View gist:d26481c21ceaab93516ad73842ce70b6
CODE:
int debug = 1;
sysctlbyname("debug.kdb.enter", NULL, NULL, &debug, sizeof(debug));
WHERE:
libc - abort
login - bail
@mizhka
mizhka / old-mips-malloc-init-issue.lst
Created Feb 14, 2018
old-mips-malloc-init-issue.lst
View old-mips-malloc-init-issue.lst
CFE> boot -tftp 192.168.1.2:/kernel.BCM.tramp.bin -raw -max=0x700000 -addr=0x80900000
Loader:raw Filesys:tftp Dev:eth0 File:192.168.1.2:/kernel.BCM.tramp.bin Options:(null)
Loading: CFE works as TFTP Client.
.......TFTP_BLKLEN!!
break!! last block!!
.. 5419928 bytes read
Entry at 0x80900000
Closing network.
Starting program at 0x80900000
entry: mips_init()
View 3g-router-linux.lst
U-Boot 1.1.3 (Jul 8 2013 - 10:13:26)
Board: Ralink APSoC DRAM: 32 MB
relocate_code Pointer at: 81fb4000
******************************
Software System Reset Occurred
******************************
spi_wait_nsec: 42
spi device id: c2 20 16 c2 20 (2016c220)
find flash: MX25L3205D
View evolution-rebuild.lst
/usr/local/lib/libwebkit2gtk-4.0.so.37: Undefined symbol "soup_auth_negotiate_supported"
/usr/local/lib/libwebkit2gtk-4.0.so.37: Undefined symbol "soup_auth_negotiate_supported"
View mips_test_tls_idalloctm.lst
Tracing pid 207 tid 100060 td 0x806c6780
[kernel] kdb_enter+0x48 (?,?,?,?) ra 8018e6e4 sp c04f5b90 sz 24 subr 8018e594
[kernel] kdb_sysctl_enter+0xbc (?,?,?,?) ra 8014f7b0 sp c04f5ba8 sz 48 subr 8018e628
[kernel] sysctl_root_handler_locked+0xa4 (?,?,?,?) ra 8014fa78 sp c04f5bd8 sz 56 subr 8014f70c
[kernel] sysctl_root+0xd8 (?,?,?,?) ra 8014fed4 sp c04f5c10 sz 96 subr 8014f9a0
[kernel] userland_sysctl+0x110 (806c6780,?,?,?) ra 80150184 sp c04f5c70 sz 112 subr 8014fdc4
[kernel] sys___sysctl+0xac (?,?,?,?) ra 80349874 sp c04f5ce0 sz 168 subr 801500d8
[kernel] trap+0x1000 (?,?,?,?) ra 80336304 sp c04f5d88 sz 248 subr 80348874
[kernel] MipsUserGenException+0x10c (?,?,?,?) ra 00000000 sp c04f5e80 sz 0 subr 803361f8
--- exception, cause 4ea420 badvaddr 25 ---
You can’t perform that action at this time.