Advertisement
erodemobiles

gmail port

Apr 18th, 2011
889
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.58 KB | None | 0 0
  1. # Created by Cl3BeeR <clebeer[at]gmail[dot]com>
  2. # Thu May 06 2010
  3. --- ratproxy.c  2009-03-31 07:32:10.000000000 -0300
  4. +++ ratproxy.c  2010-05-06 09:59:06.167625043 -0300
  5. @@ -77,6 +77,7 @@
  6.  _u8* trace_dir;                    /* Trace directory            */
  7.  _u32 proxy_port = 8080;                /* Upstream proxy port        */
  8.  _u8  use_len;                  /* Use length, not cksum      */
  9. +_u8* non_http;                 /* Accept requests for non-HTTP ports      */
  10.  
  11.  static FILE* outfile;              /* Output file descriptor     */
  12.  
  13. @@ -105,6 +106,7 @@
  14.          "   -m            - log all active content referenced across domains\n"
  15.          "   -X            - disruptively validate XSRF, XSS protections\n"
  16.          "   -C            - try to auto-correct persistent side effects of -X\n"
  17. +        "   -N            - Accept requests to non-HTTP ports \n"
  18.          "   -k            - flag HTTP requests as bad (for HTTPS-only applications)\n"
  19.          "   -a            - indiscriminately report all visited URLs\n\n"
  20.  
  21. @@ -1660,9 +1662,9 @@
  22.  
  23.    signal(SIGPIPE, SIG_IGN);
  24.  
  25. -  debug("ratproxy version " VERSION " by <lcamtuf@google.com>\n");
  26. +  debug("ratproxy version " VERSION " by <lcamtuf@google.com> Non-http Patch by <clebeer@gmail.com>\n");
  27.  
  28. -  while ((opt = getopt(argc,argv,"+w:v:p:d:P:itxgjmafske2clXCr")) > 0)
  29. +  while ((opt = getopt(argc,argv,"+w:v:p:d:P:itxgjmafske2clXCrN")) > 0)
  30.      switch (opt) {
  31.  
  32.        case 'w': {
  33. @@ -1726,6 +1728,10 @@
  34.          all_xss = 1;
  35.          break;
  36.  
  37. +      case 'N':
  38. +   non_http = 1;
  39. +   break;
  40. +
  41.        case 'g':
  42.          get_xsrf = 1;
  43.          break;
  44. --- http.c  2009-05-13 16:41:01.000000000 -0300
  45. +++ http.c  2010-05-04 10:45:45.366625269 -0300
  46. @@ -53,6 +53,7 @@
  47.  extern _u8* use_proxy;     /* Runtime setting exports from ratproxy. */
  48.  extern _u32 proxy_port;
  49.  extern _u8  use_len;
  50. +extern _u8* non_http;
  51.  
  52.  static _u8 srv_buf[MAXLINE],   /* libc IO buffers */
  53.             cli_buf[MAXLINE];
  54. @@ -496,7 +497,7 @@
  55.      if (!ret->port || ret->port > 65535)
  56.        http_error(client,"Illegal port specification",1);
  57.  
  58. -    if (ret->port < 1024 && ret->port != 80 && ret->port != 443)
  59. +   if (!non_http && (ret->port < 1024 && ret->port != 80 && ret->port != 443))
  60.        http_error(client,"Access to this port denied",1);
  61.  
  62.      *x = 0;
  63. --- config.h    2009-05-13 16:40:38.000000000 -0300
  64. +++ config.h    2010-05-06 10:00:03.570624548 -0300
  65. @@ -26,7 +26,7 @@
  66.  
  67.  #include "types.h"
  68.  
  69. -#define VERSION        "1.58-beta"
  70. +#define VERSION        "1.58-beta-CleBe3R-Non-http-Patch"
  71.  
  72.  /* Maximum request / response header line length (HTTP traffic
  73.     that exceeds this limit will be rejected). */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement