Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Nedeľa, 25. október 2026

Rozdiely pre dead/mail2sms/mail2sms.c medzi verziami 1.6 a 1.7

verzia 1.6, 2001/09/28 16:11:25 verzia 1.7, 2001/09/28 17:10:32
Riadok 1 
Riadok 1 
 /*  /*
  * Author: rajo <host8@kepler.fmph.uniba.sk>   * Author: rajo <host8@kepler.fmph.uniba.sk>
  * $Log$   * $Log$
    * Revision 1.7  2001/09/28 17:10:32  host8
    * Source code formated better
    *
  * Revision 1.6  2001/09/28 16:11:25  host8   * Revision 1.6  2001/09/28 16:11:25  host8
  * Test, if log message was changed good   * Test, if log message was changed good
  *   *
Riadok 43  void void_read_at_exit(void)
Riadok 46  void void_read_at_exit(void)
         while (!koniec) { // prazdne citanie zo stdin, ked sa neposiela smska          while (!koniec) { // prazdne citanie zo stdin, ked sa neposiela smska
                 FD_ZERO(&fds);                  FD_ZERO(&fds);
                 FD_SET(0,&fds);                  FD_SET(0,&fds);
                 switch(select(FD_SETSIZE,&fds,0,0,0)) {                  switch (select(FD_SETSIZE,&fds,0,0,0)) {
                         case -1 :                          case -1 :
                                 perror("");                                  perror("");
                                 exit(errno);                                  exit(errno);
Riadok 54  void void_read_at_exit(void)
Riadok 57  void void_read_at_exit(void)
                                         else koniec=1;                                          else koniec=1;
                                 }                                  }
                                 break;                                  break;
                 } // end switch( select() )                  } // end switch ( select() )
         } // end while(!koniec)          } // end while (!koniec)
   
         free(message);          free(message);
         free(scratch);          free(scratch);
Riadok 68  int sendsms(char *str, int show_info)
Riadok 71  int sendsms(char *str, int show_info)
         //int info=show_info;          //int info=show_info;
   
         // GET http request {{{          // GET http request {{{
         if (g.gate==AZET) {          if (g.gat == ZET) {
                 http_request(HTTP_GET, "/index.phtml?", "sms.azet.sk", NULL);                  http_request(HTTP_GET, "/index.phtml?", "sms.azet.sk", NULL);
                 http_set_referer("sms2.azet.sk", "/");                  http_set_referer("sms2.azet.sk", "/");
                 http_request(HTTP_POST, "/index.phtml", "sms.azet.sk",                  http_request(HTTP_POST, "/index.phtml", "sms.azet.sk",
Riadok 78  int sendsms(char *str, int show_info)
Riadok 81  int sendsms(char *str, int show_info)
                                                                 strlen(str), str);                                                                  strlen(str), str);
   
         }          }
         else if (g.gate==WHIZDIARY) {          else if (g.gat == HIZDIARY) {
                 http_request(HTTP_GET, "/home.asp", "www.whizdiary.com", NULL);                  http_request(HTTP_GET, "/home.asp", "www.whizdiary.com", NULL);
                 http_request(HTTP_GET, "/noCookies.asp", "www.whizdiary.com", NULL);                  http_request(HTTP_GET, "/noCookies.asp", "www.whizdiary.com", NULL);
                 http_request(HTTP_GET, "/default.asp", "www.whizdiary.com", NULL);                  http_request(HTTP_GET, "/default.asp", "www.whizdiary.com", NULL);
Riadok 161  void analyze_mail(char *str)
Riadok 164  void analyze_mail(char *str)
                 if (pom == strstr(pom, "content-transfer-encoding: 8bit") ||                  if (pom == strstr(pom, "content-transfer-encoding: 8bit") ||
                                                                 pom == strstr(pom, "content-transfer-encoding:"                                                                  pom == strstr(pom, "content-transfer-encoding:"
                                                                         " 7bit")) {                                                                          " 7bit")) {
                 } else {                  }
   else {
                         fprintf(stderr, "NO SMS SEND: '%s'\n", str);                          fprintf(stderr, "NO SMS SEND: '%s'\n", str);
                         free(pom);                          free(pom);
                         void_read_at_exit();                          void_read_at_exit();
Riadok 360  int main(int argc, char *argv[])
Riadok 364  int main(int argc, char *argv[])
                         if (g.debug)                          if (g.debug)
                                 fprintf (stderr, "%s ", argv[optind]);                                  fprintf (stderr, "%s ", argv[optind]);
                         strcat(message, argv[optind++]);                          strcat(message, argv[optind++]);
                         if(argv[optind] != NULL) strcat(message, "+");                          if (argv[optind] != NULL) strcat(message, "+");
                 }                  }
                 fprintf(stderr, "\n");                  fprintf(stderr, "\n");
                 if (g.debug)                  if (g.debug)
Riadok 371  int main(int argc, char *argv[])
Riadok 375  int main(int argc, char *argv[])
         while (!koniec) {          while (!koniec) {
                 FD_ZERO(&fds);                  FD_ZERO(&fds);
                 FD_SET(0,&fds);                  FD_SET(0,&fds);
                 switch(select(FD_SETSIZE,&fds,0,0,0)) {                  switch (select(FD_SETSIZE,&fds,0,0,0)) {
                         case -1 :                          case -1 :
                                 exit(errno);                                  exit(errno);
                                 break;                                  break;
Riadok 379  int main(int argc, char *argv[])
Riadok 383  int main(int argc, char *argv[])
                                 if (FD_ISSET(0,&fds)) {                                  if (FD_ISSET(0,&fds)) {
                                         if (fgets(keybd, KEYBD_LEN-1, stdin)!=NULL) {                                          if (fgets(keybd, KEYBD_LEN-1, stdin)!=NULL) {
                                                 //                      printf("Reading: '%s'\n", keybd);                                                  //                      printf("Reading: '%s'\n", keybd);
                                                 if(g.is_mail) {                                                  if (g.is_mail) {
                                                         analyze_mail(keybd);                                                          analyze_mail(keybd);
                                                 }                                                  }
                                                 else {                                                  else {
Riadok 389  int main(int argc, char *argv[])
Riadok 393  int main(int argc, char *argv[])
                                         else koniec=1;                                          else koniec=1;
                                 }                                  }
                                 break;                                  break;
                 } // end switch( select() )                  } // end switch ( select() )
         } // end while(!koniec)          } // end while (!koniec)
         strcat(message, g.text);          strcat(message, g.text);
         if (g.gate==AZET) {          if (g.gate==AZET) {
                 strcat(message, "&oslovenie=Ahoj+Milacik%21+&velkost=420"                  strcat(message, "&oslovenie=Ahoj+Milacik%21+&velkost=420"

Legend:
Odstranené z verzie1.6  
zmenené riadky
  Pridané vo verzii1.7

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok