- 博客(470)
- 资源 (2353)
- 收藏
- 关注
原创 uboot使用udp
int readlinefromudp(char* buffer,int size){}intNetLoop(proto_t protocol){ bd_t *bd = gd->bd;#ifdef CONFIG_NET_MULTI NetRestarted = 0; NetDevExists = 0;#endif /* XXX problem with bss wo
2015-12-15 17:01:35 1394
原创 主备同步
151211 17:44:16 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.151211 17:44:17 [Warning] Neither --relay-log nor --rela
2015-12-11 17:59:56 1068
原创 backuprestore
#!/usr/bin/expect -fset timeout -1 set HOSTDIR "a@ubuntu"set TARGETDIR "root@xxxxxxx" set TARGETIP 192.168.1.199set USERNAME “xxxxxx\n"set PASSWORD "xxxxxx\n"############tar
2015-12-11 11:33:24 912
转载 udhcpc
前提:系统已经实现DNS(即使用pingwww.baidu.com测试时能ping通)。1. 在内核中添加以下选项:Networking ---> [*] Networking support Networking options ---> Packet socket //添加.配置C
2015-12-09 09:42:46 9644 1
转载 connect timeout
转自点击打开链接http://www.cnblogs.com/zhuyf87/archive/2012/12/26/2833832.htmlbool ConnectWithTimeout(SOCKET socket, char * host, int port, int timeout){ TIMEVAL timeval = {0}; timeval.tv_sec
2015-12-04 14:10:39 917
原创 flog
#include "stdafx.h"#include "stdio.h"void flog(const char* format,...){ char lpPath[100]={0}; sprintf(lpPath,"log%d.txt",GetCurrentThreadId()); char name[32]; FILE *fd = fopen(lpPath,"a+b
2015-12-04 14:08:23 688
原创 word to tif
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.IO;usi
2015-12-03 18:22:24 325
原创 word to txt
#include "stdafx.h"#include "HandleWord.h"#include "msword.h"HandleWord::HandleWord(){}HandleWord::HandleWord(const char* fileName){ FileName=fileName;}HandleWord::~Ha
2015-12-03 13:59:03 316
原创 convertdoc
int __thiscall CConvertAgent::ConvertDoc(CConvertAgent *this, const char *Str, const char *lpFileName){ int v3; // esi@1 DWORD v4; // ebx@1 int result; // eax@3 int v6; // esi@4 bool v7; //
2015-12-02 19:47:34 714
原创 VAPI_SetEthMac
/* This MAC address will be used in the IP/UDP/RTP (UDPTL) frame as the source MAC address.* This MAC address must be unique.* On master configuration this MAC address must be the same as the one
2015-11-25 19:13:22 521
原创 gpio配置mac地址
GPIO GPIO9 GPIO10 GPIO11 GPIO12 GPIO13MAC Address Bit MAC_STRAP0 MAC_STRAP1 MAC_STRAP2 MAC_STRAP3 MAC_STRAP40x010 R 32 bits GPIO Input Register31 : 0The value in each bit reflect the v
2015-11-23 18:46:32 352
原创 udp广播
客户端#include #include #include #include #include #include #include #include #include using namespace std; int main() { setvbuf(stdout, NULL, _IONBF, 0);
2015-11-23 18:09:43 300
原创 http请求
http 获取// HttpPost.cpp written by l_zhaohui@163.com// 2007/11/30#include "stdafx.h"#include #include #include #include #include //#include #pragma comment(lib,"wininet.lib") #defi
2015-11-14 15:15:55 726
原创 emac_set_mac_addr
#define GEMAC_SPEC_ADDR_BOTTOM(base,id) (*(volatile u32*)(((u32)(base)) + 0xE088 + (id)*8))int emac_set_mac_addr(struct emac *emac, int id, u8 *mac_addr){ u32 bottom, top; if (i
2015-11-10 15:29:48 584
原创 io读写寄存器
[原]linux驱动实践(四)--linux下读写寄存器2012-12-23阅读2732 评论0 arm裸机下读写寄存器很容易,各个寄存器和内存的地址是单一地址空间,他们是用相同的指令进行读写操作的.而在linux下就要复杂很多,因为linux支持多个体系架构的CPU。比如arm和x86就不一样,具体的差别我暂时也说不上来,这个涉及到CPU体系的设计。目前我只关心:lin
2015-11-10 14:28:30 930
原创 platform设备
platform机制开发底层设备驱动的流程:1--定义platform_device2--注册platform_device3--定义platform_driver4--注册platform_driver平台设备描述-----struct platform_device{ const char * name;设备名 int id;
2015-11-09 09:30:57 321
原创 驱动读写寄存器
#include #include #include #include #include #include #include #include "reg.h"static void *vbase;static unsigned int vsize;static void reg_unmap(void){ if(vbase){
2015-11-08 13:06:33 1022
原创 init rtl8367
G:\sftp\a8\a8\a8\rootfs\rootfs\usr\sbin\init (1 hit) Line 83: echo "init rtl8367"module.sh /lib/modules/3.1.0echo "init rtl8367"rtlcfg -irtlcfg -f -p 1 -s 1 -d 0rtlcfg -f -p 2 -s 1 -d
2015-11-07 19:02:10 2606
原创 linux expect脚本
#!/usr/bin/expect -fset timeout -1 set TARROOTLABEL "root@CRong:/#"##############################################spawn telnet 192.168.1.211expect "login:"send "root\n"expect "Password
2015-11-07 16:47:56 382
原创 uboot修改mac地址
X:\c300\uboot\include\configs\c300evm.h#define CONFIG_EXTRA_ENV_SETTINGS \ "tftpdir=/tftpboot\0" \ "mspname=msp.axf\0" \ "mtdparts=" MTDPARTS_DEFAULT "\0" \ "updateboot=tftp 1000
2015-11-07 11:38:19 6273 1
原创 修改mac地址
ifconfig修改mac地址有三种方法:方法一:1.关闭网卡设备ifconfig eth0 down2.修改MAC地址ifconfig eth0 hw ether MAC地址3.重启网卡ifconfig eth0 upservice network restart方法三:很简单的,只是在./etc/sysconfig/network-scripts
2015-11-05 09:05:48 1703
原创 U_boot 的 bootcmd 和bootargs参数详解
u-bootcmd 前面有说过bootcmd是自动启动时默认执行的一些命令,因此你可以在当前环境中定义各种不同配置,不同环境的参数设置,然后设置bootcmd为你经常使用的那种参数。u-bootargs bootargs是环境变量中的重中之重,甚至可以说整个环境变量都是围绕着bootargs来设置的。bootargs的种类非常非常的多,我们平常只是使用了几种而已,感兴趣的可
2015-11-04 11:29:29 6078
原创 led灯点亮
static int __init mru_init(void){ if(misc_register(&misc)){ printk(KERN_ERR "failed to register mru\n"); return -1; } mru_led_enable = 0; mru_led_stat = 0; gpio_direction_output(MRU_STAT_P
2015-11-02 13:40:46 517
原创 uboot ddr配置
2014.4版本uboot启动至命令行几个重要函数为:_start,_main,board_init_f,relocate_code,board_init_r。一 _start对于任何程序,入口函数是在链接时决定的,uboot的入口是由链接脚本决定的。uboot下armv7链接脚本默认目录为arch/arm/cpu/u-boot.lds。这个可以在配置文件中与CONFIG_SYS_LD
2015-11-02 09:23:22 9711
原创 websocket vb
ByteArrayToHexStrPublic Function ByteArrayToHexStr(RD() As Byte, ByVal Idx&, ByVal ln As Long) As String Dim VR As String Dim Q As Long VR = "" For Q = 0 To ln - 1 If RD(Idx + Q) <
2015-10-31 11:30:18 3836 1
原创 Warning - bad CRC, using default environment
U-Boot 1.1.6 (Jan 19 2015 - 15:14:53) Mindspeed 0.08.0 C300_V2 EVMARM 550MHz, SPU 425MHz, BUS 150MHzDRAM: 128 MBComcerto Flash Subsystem InitializationFlash: 64 MB*** Warning - bad CRC, u
2015-10-30 19:03:27 3687
原创 websocket
1.1 背景1.2 协议概览协议包含两部分:握手,数据传输。客户端的握手如下:GET /chat HTTP/1.1Host: server.example.comUpgrade: websocketConnection: UpgradeSec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==Origin: http://exampl
2015-10-30 13:33:45 2159
原创 MySql命令行创建和删除触发器
MySql命令行创建和删除触发器举例如下:现有表tab1和tab2要求触发器具有下面功能当对tab1插入一条记录时则tab2也插入相同的记录12345678mysql>delimiter //mysql> CREATETRIGGER t_afterinsert_on_tab1 ->A
2015-10-30 09:31:18 696
原创 hjtag
FLASH SECTION:SPANSIONS29GL512PMEMORY SECTION:16-BIT X 1-CHIP0xB80000000x8000000XTAL SECTION:NULLTCK SECTION:-1-1SCRIPT SECTION:SetMem+32-Bit+0x10060030+0xB802SetMem+32-Bit+0x10060034+0x
2015-10-26 14:39:58 697
原创 嵌入式Linux根文件系统构建
1 根文件 Linux要在一个分区上存放系统启动所必需的文件,如内核映像文件、内核启动后运行的第一个程序、给用户提供操作界面的Shell程序、应用程序所依赖的库等,这些必需、基本的文件合称为根文件系统,它们存放在一个分区中。根文件系统一般包括:1)基本的文件系统结构,包含一些必须的目录,比如:/dev,/proc,/bin,/etc,/lib,/usr,/tmp;2)基本程序运行所需的库函数
2015-10-25 20:54:42 1054
原创 dhcp
Linux renew ip command$ sudo dhclient -r //release ip 释放IP$ sudo dhclient //获取IPDHCP server 10.0.9.1 发现 Client发过来的 DHCP Request 他本身处理不了,所以他马上发了一个NAK让他不要再发了。然后Client端发了一个广播(discover),希望得到新的IP。S
2015-10-23 11:46:01 1560
转载 查看.a文件
查看linux静态库*.a中的函数和文件,这对某些时候是非常有用的,比如我现在正在尝试替换掉appro的2a算法库,这就需要了解appro的2a结构windows下dumpbin /exports libxxx.alinux 下nm -g --defined-only libxxx.a
2015-10-21 17:16:22 3716
原创 编译.a库文件
gcc -c hello.c这样源代码的目录下就会产生一个hello.oar cr libhello.a hello.ogcc main.c -L. -lhello -o main(注意这里-L后面有个.)
2015-10-21 16:14:29 324
原创 传真a8的启动流程
apps/c318/device.htypedef struct t38_param{/** 0 = No T.38 packet loss concealment (default) \n 1 = Packet loss concealment enabled, bad lines in page replaced by white lines \n 2 = Packet loss
2015-10-20 11:46:33 400
原创 samba
UBUNTU一、安装smb执行命令行: #sudo apt-get install samba #sudo apt-get install cifs-utils二. sudo gedit /etc/samba/smb.conf[xpshare] comment = Printer Drivers path = /home/a/product
2015-10-20 10:01:17 341
原创 传真发送的318配置和启动的流程
apps/main.cint main(int argc, char **argv){ if(server_init()){ log_err("failed to init server"); goto main_done; } if(cmd_init()){ log_err("failed to init device"); goto main_done;
2015-10-19 10:11:03 1331
转载 apache搭建
10、修改默认的Web站点目录 默认的目录为 "/usr/local/apache2/htdocs",修改apache的配置文件httpd.conf,比如在新建一个 /home/gyw/WebSite的目录作为apache的站点目录 找到DocumentRoot这一行修改为:DocumentRoot "/home/gyw/WebSite" 找到 这一行修改为:
2015-09-22 17:01:00 424
转载 vector的标准用法linux
#include "stdafx.h"#include "proto.h"#include #include #include #include #include #include //#include using namespace std;//static struct _id_sock_info* psockAddress=0;s
2015-09-22 08:43:57 1524
转载 SecureCRT 7序列号
SecureCRT 7 序列号Name: Sherrill Ray Company: Serial Number:03-40-084141 License Key: ABWGUE ZPPZ6X XHTN2S 1N7PER AB39ZJ PX3312 WS6BZF GHN2ET Issue
2015-09-22 08:34:28 2176
arm so注入代码
2018-06-22
32机器pe hook以及进程调试工具源代码
2016-09-03
linux x86平台elf 进程注入so并且实现基于rel的hook ubuntu14.01测试通过
2016-08-21
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人