⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ftp-opie.c

📁 一个从网络上自动下载文件的自由工具
💻 C
📖 第 1 页 / 共 4 页
字号:
  { 'R', 'A', 'C', 'E' },  { 'R', 'A', 'C', 'K' },  { 'R', 'A', 'C', 'Y' },  { 'R', 'A', 'F', 'T' },  { 'R', 'A', 'G', 'E' },  { 'R', 'A', 'I', 'D' },  { 'R', 'A', 'I', 'L' },  { 'R', 'A', 'I', 'N' },  { 'R', 'A', 'K', 'E' },  { 'R', 'A', 'N', 'K' },  { 'R', 'A', 'N', 'T' },  { 'R', 'A', 'R', 'E' },  { 'R', 'A', 'S', 'H' },  { 'R', 'A', 'T', 'E' },  { 'R', 'A', 'V', 'E' },  { 'R', 'A', 'Y', 'S' },  { 'R', 'E', 'A', 'D' },  { 'R', 'E', 'A', 'L' },  { 'R', 'E', 'A', 'M' },  { 'R', 'E', 'A', 'R' },  { 'R', 'E', 'C', 'K' },  { 'R', 'E', 'E', 'D' },  { 'R', 'E', 'E', 'F' },  { 'R', 'E', 'E', 'K' },  { 'R', 'E', 'E', 'L' },  { 'R', 'E', 'I', 'D' },  { 'R', 'E', 'I', 'N' },  { 'R', 'E', 'N', 'A' },  { 'R', 'E', 'N', 'D' },  { 'R', 'E', 'N', 'T' },  { 'R', 'E', 'S', 'T' },  { 'R', 'I', 'C', 'E' },  { 'R', 'I', 'C', 'H' },  { 'R', 'I', 'C', 'K' },  { 'R', 'I', 'D', 'E' },  { 'R', 'I', 'F', 'T' },  { 'R', 'I', 'L', 'L' },  { 'R', 'I', 'M', 'E' },  { 'R', 'I', 'N', 'G' },  { 'R', 'I', 'N', 'K' },  { 'R', 'I', 'S', 'E' },  { 'R', 'I', 'S', 'K' },  { 'R', 'I', 'T', 'E' },  { 'R', 'O', 'A', 'D' },  { 'R', 'O', 'A', 'M' },  { 'R', 'O', 'A', 'R' },  { 'R', 'O', 'B', 'E' },  { 'R', 'O', 'C', 'K' },  { 'R', 'O', 'D', 'E' },  { 'R', 'O', 'I', 'L' },  { 'R', 'O', 'L', 'L' },  { 'R', 'O', 'M', 'E' },  { 'R', 'O', 'O', 'D' },  { 'R', 'O', 'O', 'F' },  { 'R', 'O', 'O', 'K' },  { 'R', 'O', 'O', 'M' },  { 'R', 'O', 'O', 'T' },  { 'R', 'O', 'S', 'A' },  { 'R', 'O', 'S', 'E' },  { 'R', 'O', 'S', 'S' },  { 'R', 'O', 'S', 'Y' },  { 'R', 'O', 'T', 'H' },  { 'R', 'O', 'U', 'T' },  { 'R', 'O', 'V', 'E' },  { 'R', 'O', 'W', 'E' },  { 'R', 'O', 'W', 'S' },  { 'R', 'U', 'B', 'E' },  { 'R', 'U', 'B', 'Y' },  { 'R', 'U', 'D', 'E' },  { 'R', 'U', 'D', 'Y' },  { 'R', 'U', 'I', 'N' },  { 'R', 'U', 'L', 'E' },  { 'R', 'U', 'N', 'G' },  { 'R', 'U', 'N', 'S' },  { 'R', 'U', 'N', 'T' },  { 'R', 'U', 'S', 'E' },  { 'R', 'U', 'S', 'H' },  { 'R', 'U', 'S', 'K' },  { 'R', 'U', 'S', 'S' },  { 'R', 'U', 'S', 'T' },  { 'R', 'U', 'T', 'H' },  { 'S', 'A', 'C', 'K' },  { 'S', 'A', 'F', 'E' },  { 'S', 'A', 'G', 'E' },  { 'S', 'A', 'I', 'D' },  { 'S', 'A', 'I', 'L' },  { 'S', 'A', 'L', 'E' },  { 'S', 'A', 'L', 'K' },  { 'S', 'A', 'L', 'T' },  { 'S', 'A', 'M', 'E' },  { 'S', 'A', 'N', 'D' },  { 'S', 'A', 'N', 'E' },  { 'S', 'A', 'N', 'G' },  { 'S', 'A', 'N', 'K' },  { 'S', 'A', 'R', 'A' },  { 'S', 'A', 'U', 'L' },  { 'S', 'A', 'V', 'E' },  { 'S', 'A', 'Y', 'S' },  { 'S', 'C', 'A', 'N' },  { 'S', 'C', 'A', 'R' },  { 'S', 'C', 'A', 'T' },  { 'S', 'C', 'O', 'T' },  { 'S', 'E', 'A', 'L' },  { 'S', 'E', 'A', 'M' },  { 'S', 'E', 'A', 'R' },  { 'S', 'E', 'A', 'T' },  { 'S', 'E', 'E', 'D' },  { 'S', 'E', 'E', 'K' },  { 'S', 'E', 'E', 'M' },  { 'S', 'E', 'E', 'N' },  { 'S', 'E', 'E', 'S' },  { 'S', 'E', 'L', 'F' },  { 'S', 'E', 'L', 'L' },  { 'S', 'E', 'N', 'D' },  { 'S', 'E', 'N', 'T' },  { 'S', 'E', 'T', 'S' },  { 'S', 'E', 'W', 'N' },  { 'S', 'H', 'A', 'G' },  { 'S', 'H', 'A', 'M' },  { 'S', 'H', 'A', 'W' },  { 'S', 'H', 'A', 'Y' },  { 'S', 'H', 'E', 'D' },  { 'S', 'H', 'I', 'M' },  { 'S', 'H', 'I', 'N' },  { 'S', 'H', 'O', 'D' },  { 'S', 'H', 'O', 'E' },  { 'S', 'H', 'O', 'T' },  { 'S', 'H', 'O', 'W' },  { 'S', 'H', 'U', 'N' },  { 'S', 'H', 'U', 'T' },  { 'S', 'I', 'C', 'K' },  { 'S', 'I', 'D', 'E' },  { 'S', 'I', 'F', 'T' },  { 'S', 'I', 'G', 'H' },  { 'S', 'I', 'G', 'N' },  { 'S', 'I', 'L', 'K' },  { 'S', 'I', 'L', 'L' },  { 'S', 'I', 'L', 'O' },  { 'S', 'I', 'L', 'T' },  { 'S', 'I', 'N', 'E' },  { 'S', 'I', 'N', 'G' },  { 'S', 'I', 'N', 'K' },  { 'S', 'I', 'R', 'E' },  { 'S', 'I', 'T', 'E' },  { 'S', 'I', 'T', 'S' },  { 'S', 'I', 'T', 'U' },  { 'S', 'K', 'A', 'T' },  { 'S', 'K', 'E', 'W' },  { 'S', 'K', 'I', 'D' },  { 'S', 'K', 'I', 'M' },  { 'S', 'K', 'I', 'N' },  { 'S', 'K', 'I', 'T' },  { 'S', 'L', 'A', 'B' },  { 'S', 'L', 'A', 'M' },  { 'S', 'L', 'A', 'T' },  { 'S', 'L', 'A', 'Y' },  { 'S', 'L', 'E', 'D' },  { 'S', 'L', 'E', 'W' },  { 'S', 'L', 'I', 'D' },  { 'S', 'L', 'I', 'M' },  { 'S', 'L', 'I', 'T' },  { 'S', 'L', 'O', 'B' },  { 'S', 'L', 'O', 'G' },  { 'S', 'L', 'O', 'T' },  { 'S', 'L', 'O', 'W' },  { 'S', 'L', 'U', 'G' },  { 'S', 'L', 'U', 'M' },  { 'S', 'L', 'U', 'R' },  { 'S', 'M', 'O', 'G' },  { 'S', 'M', 'U', 'G' },  { 'S', 'N', 'A', 'G' },  { 'S', 'N', 'O', 'B' },  { 'S', 'N', 'O', 'W' },  { 'S', 'N', 'U', 'B' },  { 'S', 'N', 'U', 'G' },  { 'S', 'O', 'A', 'K' },  { 'S', 'O', 'A', 'R' },  { 'S', 'O', 'C', 'K' },  { 'S', 'O', 'D', 'A' },  { 'S', 'O', 'F', 'A' },  { 'S', 'O', 'F', 'T' },  { 'S', 'O', 'I', 'L' },  { 'S', 'O', 'L', 'D' },  { 'S', 'O', 'M', 'E' },  { 'S', 'O', 'N', 'G' },  { 'S', 'O', 'O', 'N' },  { 'S', 'O', 'O', 'T' },  { 'S', 'O', 'R', 'E' },  { 'S', 'O', 'R', 'T' },  { 'S', 'O', 'U', 'L' },  { 'S', 'O', 'U', 'R' },  { 'S', 'O', 'W', 'N' },  { 'S', 'T', 'A', 'B' },  { 'S', 'T', 'A', 'G' },  { 'S', 'T', 'A', 'N' },  { 'S', 'T', 'A', 'R' },  { 'S', 'T', 'A', 'Y' },  { 'S', 'T', 'E', 'M' },  { 'S', 'T', 'E', 'W' },  { 'S', 'T', 'I', 'R' },  { 'S', 'T', 'O', 'W' },  { 'S', 'T', 'U', 'B' },  { 'S', 'T', 'U', 'N' },  { 'S', 'U', 'C', 'H' },  { 'S', 'U', 'D', 'S' },  { 'S', 'U', 'I', 'T' },  { 'S', 'U', 'L', 'K' },  { 'S', 'U', 'M', 'S' },  { 'S', 'U', 'N', 'G' },  { 'S', 'U', 'N', 'K' },  { 'S', 'U', 'R', 'E' },  { 'S', 'U', 'R', 'F' },  { 'S', 'W', 'A', 'B' },  { 'S', 'W', 'A', 'G' },  { 'S', 'W', 'A', 'M' },  { 'S', 'W', 'A', 'N' },  { 'S', 'W', 'A', 'T' },  { 'S', 'W', 'A', 'Y' },  { 'S', 'W', 'I', 'M' },  { 'S', 'W', 'U', 'M' },  { 'T', 'A', 'C', 'K' },  { 'T', 'A', 'C', 'T' },  { 'T', 'A', 'I', 'L' },  { 'T', 'A', 'K', 'E' },  { 'T', 'A', 'L', 'E' },  { 'T', 'A', 'L', 'K' },  { 'T', 'A', 'L', 'L' },  { 'T', 'A', 'N', 'K' },  { 'T', 'A', 'S', 'K' },  { 'T', 'A', 'T', 'E' },  { 'T', 'A', 'U', 'T' },  { 'T', 'E', 'A', 'L' },  { 'T', 'E', 'A', 'M' },  { 'T', 'E', 'A', 'R' },  { 'T', 'E', 'C', 'H' },  { 'T', 'E', 'E', 'M' },  { 'T', 'E', 'E', 'N' },  { 'T', 'E', 'E', 'T' },  { 'T', 'E', 'L', 'L' },  { 'T', 'E', 'N', 'D' },  { 'T', 'E', 'N', 'T' },  { 'T', 'E', 'R', 'M' },  { 'T', 'E', 'R', 'N' },  { 'T', 'E', 'S', 'S' },  { 'T', 'E', 'S', 'T' },  { 'T', 'H', 'A', 'N' },  { 'T', 'H', 'A', 'T' },  { 'T', 'H', 'E', 'E' },  { 'T', 'H', 'E', 'M' },  { 'T', 'H', 'E', 'N' },  { 'T', 'H', 'E', 'Y' },  { 'T', 'H', 'I', 'N' },  { 'T', 'H', 'I', 'S' },  { 'T', 'H', 'U', 'D' },  { 'T', 'H', 'U', 'G' },  { 'T', 'I', 'C', 'K' },  { 'T', 'I', 'D', 'E' },  { 'T', 'I', 'D', 'Y' },  { 'T', 'I', 'E', 'D' },  { 'T', 'I', 'E', 'R' },  { 'T', 'I', 'L', 'E' },  { 'T', 'I', 'L', 'L' },  { 'T', 'I', 'L', 'T' },  { 'T', 'I', 'M', 'E' },  { 'T', 'I', 'N', 'A' },  { 'T', 'I', 'N', 'E' },  { 'T', 'I', 'N', 'T' },  { 'T', 'I', 'N', 'Y' },  { 'T', 'I', 'R', 'E' },  { 'T', 'O', 'A', 'D' },  { 'T', 'O', 'G', 'O' },  { 'T', 'O', 'I', 'L' },  { 'T', 'O', 'L', 'D' },  { 'T', 'O', 'L', 'L' },  { 'T', 'O', 'N', 'E' },  { 'T', 'O', 'N', 'G' },  { 'T', 'O', 'N', 'Y' },  { 'T', 'O', 'O', 'K' },  { 'T', 'O', 'O', 'L' },  { 'T', 'O', 'O', 'T' },  { 'T', 'O', 'R', 'E' },  { 'T', 'O', 'R', 'N' },  { 'T', 'O', 'T', 'E' },  { 'T', 'O', 'U', 'R' },  { 'T', 'O', 'U', 'T' },  { 'T', 'O', 'W', 'N' },  { 'T', 'R', 'A', 'G' },  { 'T', 'R', 'A', 'M' },  { 'T', 'R', 'A', 'Y' },  { 'T', 'R', 'E', 'E' },  { 'T', 'R', 'E', 'K' },  { 'T', 'R', 'I', 'G' },  { 'T', 'R', 'I', 'M' },  { 'T', 'R', 'I', 'O' },  { 'T', 'R', 'O', 'D' },  { 'T', 'R', 'O', 'T' },  { 'T', 'R', 'O', 'Y' },  { 'T', 'R', 'U', 'E' },  { 'T', 'U', 'B', 'A' },  { 'T', 'U', 'B', 'E' },  { 'T', 'U', 'C', 'K' },  { 'T', 'U', 'F', 'T' },  { 'T', 'U', 'N', 'A' },  { 'T', 'U', 'N', 'E' },  { 'T', 'U', 'N', 'G' },  { 'T', 'U', 'R', 'F' },  { 'T', 'U', 'R', 'N' },  { 'T', 'U', 'S', 'K' },  { 'T', 'W', 'I', 'G' },  { 'T', 'W', 'I', 'N' },  { 'T', 'W', 'I', 'T' },  { 'U', 'L', 'A', 'N' },  { 'U', 'N', 'I', 'T' },  { 'U', 'R', 'G', 'E' },  { 'U', 'S', 'E', 'D' },  { 'U', 'S', 'E', 'R' },  { 'U', 'S', 'E', 'S' },  { 'U', 'T', 'A', 'H' },  { 'V', 'A', 'I', 'L' },  { 'V', 'A', 'I', 'N' },  { 'V', 'A', 'L', 'E' },  { 'V', 'A', 'R', 'Y' },  { 'V', 'A', 'S', 'E' },  { 'V', 'A', 'S', 'T' },  { 'V', 'E', 'A', 'L' },  { 'V', 'E', 'D', 'A' },  { 'V', 'E', 'I', 'L' },  { 'V', 'E', 'I', 'N' },  { 'V', 'E', 'N', 'D' },  { 'V', 'E', 'N', 'T' },  { 'V', 'E', 'R', 'B' },  { 'V', 'E', 'R', 'Y' },  { 'V', 'E', 'T', 'O' },  { 'V', 'I', 'C', 'E' },  { 'V', 'I', 'E', 'W' },  { 'V', 'I', 'N', 'E' },  { 'V', 'I', 'S', 'E' },  { 'V', 'O', 'I', 'D' },  { 'V', 'O', 'L', 'T' },  { 'V', 'O', 'T', 'E' },  { 'W', 'A', 'C', 'K' },  { 'W', 'A', 'D', 'E' },  { 'W', 'A', 'G', 'E' },  { 'W', 'A', 'I', 'L' },  { 'W', 'A', 'I', 'T' },  { 'W', 'A', 'K', 'E' },  { 'W', 'A', 'L', 'E' },  { 'W', 'A', 'L', 'K' },  { 'W', 'A', 'L', 'L' },  { 'W', 'A', 'L', 'T' },  { 'W', 'A', 'N', 'D' },  { 'W', 'A', 'N', 'E' },  { 'W', 'A', 'N', 'G' },  { 'W', 'A', 'N', 'T' },  { 'W', 'A', 'R', 'D' },  { 'W', 'A', 'R', 'M' },  { 'W', 'A', 'R', 'N' },  { 'W', 'A', 'R', 'T' },  { 'W', 'A', 'S', 'H' },  { 'W', 'A', 'S', 'T' },  { 'W', 'A', 'T', 'S' },  { 'W', 'A', 'T', 'T' },  { 'W', 'A', 'V', 'E' },  { 'W', 'A', 'V', 'Y' },  { 'W', 'A', 'Y', 'S' },  { 'W', 'E', 'A', 'K' },  { 'W', 'E', 'A', 'L' },  { 'W', 'E', 'A', 'N' },  { 'W', 'E', 'A', 'R' },  { 'W', 'E', 'E', 'D' },  { 'W', 'E', 'E', 'K' },  { 'W', 'E', 'I', 'R' },  { 'W', 'E', 'L', 'D' },  { 'W', 'E', 'L', 'L' },  { 'W', 'E', 'L', 'T' },  { 'W', 'E', 'N', 'T' },  { 'W', 'E', 'R', 'E' },  { 'W', 'E', 'R', 'T' },  { 'W', 'E', 'S', 'T' },  { 'W', 'H', 'A', 'M' },  { 'W', 'H', 'A', 'T' },  { 'W', 'H', 'E', 'E' },  { 'W', 'H', 'E', 'N' },  { 'W', 'H', 'E', 'T' },  { 'W', 'H', 'O', 'A' },  { 'W', 'H', 'O', 'M' },  { 'W', 'I', 'C', 'K' },  { 'W', 'I', 'F', 'E' },  { 'W', 'I', 'L', 'D' },  { 'W', 'I', 'L', 'L' },  { 'W', 'I', 'N', 'D' },  { 'W', 'I', 'N', 'E' },  { 'W', 'I', 'N', 'G' },  { 'W', 'I', 'N', 'K' },  { 'W', 'I', 'N', 'O' },  { 'W', 'I', 'R', 'E' },  { 'W', 'I', 'S', 'E' },  { 'W', 'I', 'S', 'H' },  { 'W', 'I', 'T', 'H' },  { 'W', 'O', 'L', 'F' },  { 'W', 'O', 'N', 'T' },  { 'W', 'O', 'O', 'D' },  { 'W', 'O', 'O', 'L' },  { 'W', 'O', 'R', 'D' },  { 'W', 'O', 'R', 'E' },  { 'W', 'O', 'R', 'K' },  { 'W', 'O', 'R', 'M' },  { 'W', 'O', 'R', 'N' },  { 'W', 'O', 'V', 'E' },  { 'W', 'R', 'I', 'T' },  { 'W', 'Y', 'N', 'N' },  { 'Y', 'A', 'L', 'E' },  { 'Y', 'A', 'N', 'G' },  { 'Y', 'A', 'N', 'K' },  { 'Y', 'A', 'R', 'D' },  { 'Y', 'A', 'R', 'N' },  { 'Y', 'A', 'W', 'L' },  { 'Y', 'A', 'W', 'N' },  { 'Y', 'E', 'A', 'H' },  { 'Y', 'E', 'A', 'R' },  { 'Y', 'E', 'L', 'L' },  { 'Y', 'O', 'G', 'A' },  { 'Y', 'O', 'K', 'E' }};/* Extract LENGTH bits from the char array S starting with bit number   START.  It always reads three consecutive octects, which means it   can read past end of data when START is at the edge of the region. */static uint32_textract (const unsigned char *s, int start, int length){  unsigned char cl = s[start / 8];  unsigned char cc = s[start / 8 + 1];  unsigned char cr = s[start / 8 + 2];  uint32_t x;  x   = (uint32_t)(cl << 8 | cc) << 8 | cr;  x >>= 24 - (length + (start % 8));  x  &= (0xffff >> (16 - length));  return x;}/* Length of a string known to be at least 1 and at most 4 chars   long.  */#define STRLEN_1_4(s) (!(s)[1] ? 1 : !(s)[2] ? 2 : !(s)[3] ? 3 : 4)/* Encode 8 bytes in C as a string of English words and store them to   STORE.  Returns STORE.  */static char *btoe (char *store, const unsigned char *c){  unsigned char cp[10];         /* add in room for the parity 2 bits +                                   extract() slop.  */  int p, i;  char *store_beg = store;  *store = '\0';  /* Workaround for extract() reads beyond end of data */  xzero (cp);  memcpy (cp, c, 8);  /* Compute parity and append it to CP.  */  for (p = 0, i = 0; i < 64; i += 2)    p += extract (cp, i, 2);  cp[8] = (char)p << 6;  /* The 64 bits of input and the two parity bits comprise 66 bits of     data that are now in CP.  We convert that information, 11 bits at     a time, to English words indexed from Wp.  Since there are 2048     (2^11) words in Wp, every 11-bit combination corresponds to a     distinct word.  */  memcpy (store, &Wp[extract (cp,  0, 11)][0], 4);  store += STRLEN_1_4 (store);  *store++ = ' ';  memcpy (store, &Wp[extract (cp, 11, 11)][0], 4);  store += STRLEN_1_4 (store);  *store++ = ' ';  memcpy (store, &Wp[extract (cp, 22, 11)][0], 4);  store += STRLEN_1_4 (store);  *store++ = ' ';  memcpy (store, &Wp[extract (cp, 33, 11)][0], 4);  store += STRLEN_1_4 (store);  *store++ = ' ';  memcpy (store, &Wp[extract (cp, 44, 11)][0], 4);  store += STRLEN_1_4 (store);  *store++ = ' ';  memcpy (store, &Wp[extract (cp, 55, 11)][0], 4);  store[4] = '\0';              /* make sure the string is terminated */  DEBUGP (("wrote `%s' to STORE\n", store_beg));  return store_beg;}/* Calculate the SKEY response, based on the sequence, seed   (challenge), and the secret password.  The calculated response is   used instead of the real password when logging in to SKEY-enabled   servers.   The result is calculated like this:   + Concatenate SEED and PASS and calculate the 16-byte MD5 checksum.   + Shorten the checksum to eight bytes by folding the second eight     bytes onto the first eight using XOR.  The resulting eight-byte     sequence is the key.   + MD5-process the key, fold the checksum to eight bytes and store     it back to the key.  Repeat this crunching SEQUENCE times.     (Sequence is a number that gets decremented every time the user     logs in to the server.  Therefore an eavesdropper would have to     invert the hash function in order to guess the next one-time     password.)   + Convert the resulting 64-bit key to 6 English words separated by     spaces (see btoe for details) and return the resulting ASCII     string.   All this is described in section 6 of rfc2289 in more detail.  */const char *skey_response (int sequence, const char *seed, const char *pass){  unsigned char key[8];  /* Room to hold 6 four-letter words (heh), 5 space separators, and     the terminating \0.  24+5+1 == 30  */  static char english[30];  ALLOCA_MD5_CONTEXT (md5_ctx);  uint32_t checksum[4];  gen_md5_init (md5_ctx);  gen_md5_update ((const unsigned char *)seed, strlen(seed), md5_ctx);  gen_md5_update ((const unsigned char *)pass, strlen(pass), md5_ctx);  gen_md5_finish (md5_ctx, (unsigned char *)checksum);  checksum[0] ^= checksum[2];  checksum[1] ^= checksum[3];  memcpy (key, checksum, 8);  while (sequence-- > 0)    {      gen_md5_init (md5_ctx);      gen_md5_update ((unsigned char *) key, 8, md5_ctx);      gen_md5_finish (md5_ctx, (unsigned char *) checksum);      checksum[0] ^= checksum[2];      checksum[1] ^= checksum[3];      memcpy (key, checksum, 8);    }  return btoe (english, key);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -