Chinaunix

标题: 请问如何修改自己的IP包? [打印本页]

作者: wilbur_cy    时间: 2007-01-30 18:58
标题: 请问如何修改自己的IP包?
可能我说的不是很清楚
是这样的

有一个论坛 它设置了不同的IP只能在规定时间内注册一次 我想抢一个比较好的ID序列号

呵呵

所以想自己做一个 可以改变发送注册包的IP 的程序 也就是自己封装一个注册包 把IP改了

再 发过去

我是这样想的 我只发送注册消息给服务器 不管它是否注册成功

然后再发登陆包给服务器 看它能否登陆成功 不知道可行否


还有就是 我也用代理试过的 注册时它说 :"不能使用代理注册"
不知道它是怎么知道我用的代理...

我现在在网上找了一些资料 用Ethereal抓了一些包 正在学习


听说好像在Linux下可以改变IP地址 请问是怎么做的呢
作者: mq110    时间: 2007-01-31 11:24
本版精华里就有一篇关于raw socket的文章.
你可以做个参考.
作者: 朱熹之    时间: 2007-01-31 11:49
方法1:使用raw socket
方法2:直接编程操作网卡
作者: langue    时间: 2007-01-31 17:27
原帖由 朱熹之 于 2007-1-31 11:49 发表于 3楼  
方法1:使用raw socket
方法2:直接编程操作网卡


听说有个 raw IP,不知道你说的是不是这个。

我所知道的访问链路层的方法:用 libpcap,很多平台上都能用,win32 上可以用 WinPCAP

Linux 上有 PF_PACKET

对于 raw IP,用 SOCK_RAW

--
作者: wilbur_cy    时间: 2007-02-01 09:35
用raw sockt估计是不行了 因为要先建立TCP连接 才能POST http报文  

我把IP改了的话 就收不到 服务器发来的回复 也就建立不起连接了

直接编程操作网卡 是什么意思呢 能否说的详细一些 ?谢谢
作者: ssffzz1    时间: 2007-02-01 16:46
那么返回的数据怎么走
作者: langue    时间: 2007-02-01 17:56
--

我本想说 bpf 的,后来想想只能用在 Berkeley Unix 上,所以说了 libpcap,这个是通用接口。

另外,似乎 UNIX 和 Unix 的含义不同?看来以后不能乱用了。

--
作者: platinum    时间: 2007-02-03 02:58
楼主的思路不可行,违背了 TCP 原理
即使你可以实现修改 IP,但这样的数据包也不会合法
作者: langue    时间: 2007-02-03 10:54
原帖由 langue 于 2007-2-1 17:56 发表于 7楼  
--

我本想说 bpf 的,后来想想只能用在 Berkeley Unix 上,所以说了 libpcap,这个是通用接口。

另外,似乎 UNIX 和 Unix 的含义不同?看来以后不能乱用了。

--

3 definitions found for UNIX

From WordNet (r) 2.0 :

  UNIX
       n : trademark for a powerful operating system [syn: UNIX system,
            UNIX operating system]


From Jargon File (4.3.1, 29 Jun 2001) :

  Unix /yoo'niks/ n. [In the authors' words, "A weak pun on Multics";
     very early on it was `UNICS'] (also `UNIX') An interactive time-sharing
     system invented in 1969 by Ken Thompson after Bell Labs left the Multics
     project, originally so he could play games on his scavenged PDP-7.
     Dennis Ritchie, the inventor of C, is considered a co-author of the
     system. The turning point in Unix's history came when it was
     reimplemented almost entirely in C during 1972-1974, making it the first
     source-portable OS. Unix subsequently underwent mutations and expansions
     at the hands of many different people, resulting in a uniquely flexible
     and developer-friendly environment. By 1991, Unix had become the most
     widely used multiuser general-purpose operating system in the world -
     and since 1996 the variant called Linux has been at the cutting edge
     of the open source movement. Many people consider the success of Unix
     the most important victory yet of hackerdom over industry opposition
     (but see Unix weenie and Unix conspiracy for an opposing point of
     view). See Version 7, BSD, Linux.

     Some people are confused over whether this word is appropriately
     `UNIX' or `Unix'; both forms are common, and used interchangeably.
     Dennis Ritchie says that the `UNIX' spelling originally happened in
     CACM's 1974 paper "The UNIX Time-Sharing System" because "we had a new
     typesetter and troff had just been invented and we were intoxicated by
     being able to produce small caps." Later, dmr tried to get the spelling
     changed to `Unix' in a couple of Bell Labs papers, on the grounds that
     the word is not acronymic. He failed, and eventually (his words) "wimped
     out" on the issue. So, while the trademark today is `UNIX', both
     capitalizations are grounded in ancient usage; the Jargon File uses
     `Unix' in deference to dmr's wishes.




From The Free On-line Dictionary of Computing (27 SEP 03) :

  Unix
      
           /yoo'niks/ (Or "UNIX", in the authors'
          words, "A weak pun on Multics") Plural "Unices".  An
          interactive time-sharing operating system invented in 1969
          by Ken Thompson after Bell Labs left the Multics
          project, originally so he could play games on his scavenged
          PDP-7.  Dennis Ritchie, the inventor of C, is considered
          a co-author of the system.
      
          The turning point in Unix's history came when it was
          reimplemented almost entirely in C during 1972 - 1974, making
          it the first source-portable OS.  Unix subsequently
          underwent mutations and expansions at the hands of many
          different people, resulting in a uniquely flexible and
          developer-friendly environment.
      
          By 1991, Unix had become the most widely used multi-user
          general-purpose operating system in the world.  Many people
          consider this the most important victory yet of hackerdom over
          industry opposition (but see Unix weenie and Unix
          conspiracy for an opposing point of view).
      
          Unix is now offered by many manufacturers and is the subject
          of an international standardisation effort [called?].
          Unix-like operating systems include AIX, A/UX, BSD,
          Debian, FreeBSD, GNU, HP-UX, Linux, NetBSD,
          NEXTSTEP, OpenBSD, OPENSTEP, OSF, POSIX, RISCiX,
          Solaris, SunOS, System V, Ultrix, USG Unix, Version
          7, Xenix.
      
          "Unix" or "UNIX"?  Both seem roughly equally popular, perhaps
          with a historical bias toward the latter.  "UNIX" is a
          registered trademark of The Open Group, however, since it is
          a name and not an acronym, "Unix" has been adopted in this
          dictionary except where a larger name includes it in upper
          case.  Since the OS is case-sensitive and exists in many
          different versions, it is fitting that its name should reflect
          this.
      
          The UNIX Reference Desk
          http://www.geek-girl.com/unix.html)">(http://www.geek-girl.com/unix.html).
      
          Spanish fire extinguisher
         
       ftp://linux.mathematik.tu-darmst ... okir/unix_flame.gif)">(ftp://linux.mathematik.tu-darmst ... okir/unix_flame.gif ).
      
          [{Jargon File]
      
          (2001-05-14)

作者: huaping3263    时间: 2007-02-03 12:38
弄好了.介绍给我哦.
作者: langue    时间: 2007-02-03 15:54
--

tripp + libpcap/winpcap

--
作者: mudga    时间: 2007-02-03 16:21
不如多想想怎么攻克它的数据库比较现实呢
作者: platinum    时间: 2007-02-04 09:36
原帖由 wilbur_cy 于 2007-1-30 18:58 发表于 1楼  
我是这样想的 我只发送注册消息给服务器 不管它是否注册成功

然后再发登陆包给服务器 看它能否登陆成功 不知道可行否

我一直有个疑问,还是我始终没有弄懂楼主的用意?
根据我的理解,楼主似乎要去某个地方(类似论坛)注册 ID,而注册是需要认证 IP 地址的(类似投票那样)
所以,楼主想通过修改 IP 的方法来实现某些需求
但是根据 TCP 原理,若改了数据包的源 IP,新 IP 的 TCP 三次握手没有在服务器端建立,发送的 TCP 数据会被服务器接受吗?
这样的数据包不是被 server RST 回来就是会被 DROP 啊!

还是说……我理解错了?
作者: langue    时间: 2007-02-04 09:41
--

请教一下白金版主,discard 和 drop 的异同?谢谢。

--
作者: platinum    时间: 2007-02-04 09:55
原帖由 langue 于 2007-2-4 09:41 发表于 14楼  
--

请教一下白金版主,discard 和 drop 的异同?谢谢。

--

我没有这方面的研究,这两个词是哪里来的?我只知道 drop
作者: langue    时间: 2007-02-04 10:17
原帖由 platinum 于 2007-2-4 09:55 发表于 15楼  

我没有这方面的研究,这两个词是哪里来的?我只知道 drop


TCP/IP, Illustrated

--
作者: platinum    时间: 2007-02-04 10:28
请教 langue 版主,我 13 楼的理解是否存在问题?
作者: langue    时间: 2007-02-04 10:54
原帖由 platinum 于 2007-2-4 10:28 发表于 17楼  
请教 langue 版主,我 13 楼的理解是否存在问题?


你不妨直接告诉楼主,用匿名代理服务器上去,就行了。

天哪,这又要培养出一批广告专业户了。

--
作者: platinum    时间: 2007-02-04 11:00
原帖由 langue 于 2007-2-4 10:54 发表于 18楼  


你不妨直接告诉楼主,用匿名代理服务器上去,就行了。

天哪,这又要培养出一批广告专业户了。

--

晕,明白了,自己把自己绕进去了……
作者: langue    时间: 2007-02-04 11:04
--

楼主陈述的情况说明他用的是非匿名代理,至少代理服务器向目标服务器发出请求的时候加上了 X-Forwarded-For 这个头信息。找一个不是这样的代理,就应该能通过。

--
作者: wilbur_cy    时间: 2007-02-05 15:58
原帖由 langue 于 2007-2-4 11:04 发表于 20楼  
--

楼主陈述的情况说明他用的是非匿名代理,至少代理服务器向目标服务器发出请求的时候加上了 X-Forwarded-For 这个头信息。找一个不是这样的代理,就应该能通过。

--


哦  原来是这样啊  

我想连续注册  如果找一个匿名代理的话 可能不够用 只能在一段时间里 注册一次  这个代理就没用了..
作者: wilbur_cy    时间: 2007-02-05 16:00
我只知道wincap 因为抓包我用的是Ethereal 需要wincap这个库

tripp + libpcap/winpcap  是啥呢  可以改ip么
作者: changxy    时间: 2007-02-13 10:32
感觉 这个还是要看看  论坛的对这个的处理机制。。。
如果是在三次握手的 抓取包头的IP地址  那么 就没有办法了。。以前WIN下有个NC 是可以发送数据包的。。但是 回不来啊。。。




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2