Skript-Schnipsel - Revision history http://wiki.dd-wrt.com/wiki/index.php?title=Skript-Schnipsel&action=history Revision history for this page on the wiki en MediaWiki 1.10.1 Fri, 29 Mar 2024 05:00:04 GMT Glenn: +{{Languages|Script examples}} chg http://wiki.dd-wrt.com/wiki/index.php?title=Skript-Schnipsel&diff=32439&oldid=prev <p>+{{Languages|Script examples}} chg</p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 16:52, 11 May 2010</td> </tr> <tr><td colspan="2" align="left"><strong>Line 1:</strong></td> <td colspan="2" align="left"><strong>Line 1:</strong></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">{{Languages|Script examples}}</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">===Drahtlose Schnipsel===</td><td> </td><td style="background: #eee; font-size: smaller;">===Drahtlose Schnipsel===</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">====wl====</td><td> </td><td style="background: #eee; font-size: smaller;">====wl====</td></tr> <tr><td colspan="2" align="left"><strong>Line 451:</strong></td> <td colspan="2" align="left"><strong>Line 453:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">*mgate.chello.at 25</td><td> </td><td style="background: #eee; font-size: smaller;">*mgate.chello.at 25</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">*mx.freenet.de 25</td><td> </td><td style="background: #eee; font-size: smaller;">*mx.freenet.de 25</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"></td><td colspan="2">&nbsp;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">===Links===</td><td colspan="2">&nbsp;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">Dieselbe Kategorie im [http://www.dd-wrt.com/wiki/index.php/Script_Examples englischen Wiki]</td><td colspan="2">&nbsp;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">[[Category:Scripts/de]]</td><td> </td><td style="background: #eee; font-size: smaller;">[[Category:Scripts/de]]</td></tr> </table> Tue, 11 May 2010 16:52:38 GMT Glenn http://wiki.dd-wrt.com/wiki/index.php/Talk:Skript-Schnipsel Glenn: catchg http://wiki.dd-wrt.com/wiki/index.php?title=Skript-Schnipsel&diff=32438&oldid=prev <p>catchg</p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 16:51, 11 May 2010</td> </tr> <tr><td colspan="2" align="left"><strong>Line 455:</strong></td> <td colspan="2" align="left"><strong>Line 455:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Dieselbe Kategorie im [http://www.dd-wrt.com/wiki/index.php/Script_Examples englischen Wiki]</td><td> </td><td style="background: #eee; font-size: smaller;">Dieselbe Kategorie im [http://www.dd-wrt.com/wiki/index.php/Script_Examples englischen Wiki]</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">[[Category:<del style="color: red; font-weight: bold; text-decoration: none;">Deutsche Dokumentation</del>]]</td><td>+</td><td style="background: #cfc; font-size: smaller;">[[Category:<ins style="color: red; font-weight: bold; text-decoration: none;">Scripts/de</ins>]]</td></tr> </table> Tue, 11 May 2010 16:51:25 GMT Glenn http://wiki.dd-wrt.com/wiki/index.php/Talk:Skript-Schnipsel Pepe: /* Syslog per E-Mail */ http://wiki.dd-wrt.com/wiki/index.php?title=Skript-Schnipsel&diff=26274&oldid=prev <p><span class="autocomment">Syslog per E-Mail</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 15:19, 27 July 2009</td> </tr> <tr><td colspan="2" align="left"><strong>Line 395:</strong></td> <td colspan="2" align="left"><strong>Line 395:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">MAILSERVER=&quot;smtp.mailserver.org&quot;</td><td> </td><td style="background: #eee; font-size: smaller;">MAILSERVER=&quot;smtp.mailserver.org&quot;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">RESET_ROUTER=/usr/sbin/reboot</td><td> </td><td style="background: #eee; font-size: smaller;">RESET_ROUTER=/usr/sbin/reboot</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">DATE=&quot;`date +%<del style="color: red; font-weight: bold; text-decoration: none;">u</del>`. `date +%B` `date +%Y` `date +%R`&quot;</td><td>+</td><td style="background: #cfc; font-size: smaller;">DATE=&quot;`date +%<ins style="color: red; font-weight: bold; text-decoration: none;">d</ins>`. `date +%B` `date +%Y` `date +%R`&quot;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">MARKER=&quot;### Report from $DATE ends here ###&quot;</td><td> </td><td style="background: #eee; font-size: smaller;">MARKER=&quot;### Report from $DATE ends here ###&quot;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> </table> Mon, 27 Jul 2009 15:19:21 GMT Pepe http://wiki.dd-wrt.com/wiki/index.php/Talk:Skript-Schnipsel Dr. Ongo: /* Syslog per E-Mail */ http://wiki.dd-wrt.com/wiki/index.php?title=Skript-Schnipsel&diff=26121&oldid=prev <p><span class="autocomment">Syslog per E-Mail</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 00:18, 10 July 2009</td> </tr> <tr><td colspan="2" align="left"><strong>Line 337:</strong></td> <td colspan="2" align="left"><strong>Line 337:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">===Syslog per E-Mail===</td><td> </td><td style="background: #eee; font-size: smaller;">===Syslog per E-Mail===</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">Das Ganze ist in Zusammenarbeit mit <del style="color: red; font-weight: bold; text-decoration: none;">'''</del>Victor F.<del style="color: red; font-weight: bold; text-decoration: none;">''' </del>erfolgreich getestet worden</td><td>+</td><td style="background: #cfc; font-size: smaller;">Das Ganze ist in Zusammenarbeit mit Victor F. erfolgreich getestet worden</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">der <del style="color: red; font-weight: bold; text-decoration: none;">Passende </del>Thread findet sich <del style="color: red; font-weight: bold; text-decoration: none;">hier.</del></td><td>+</td><td style="background: #cfc; font-size: smaller;">der <ins style="color: red; font-weight: bold; text-decoration: none;">passende </ins>Thread findet sich <ins style="color: red; font-weight: bold; text-decoration: none;">[</ins>http://www.dd-wrt.com/phpBB2/viewtopic.php?t=53000 <ins style="color: red; font-weight: bold; text-decoration: none;">hier.]</ins></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">http://www.dd-wrt.com/phpBB2/viewtopic.php?t=53000<del style="color: red; font-weight: bold; text-decoration: none;">&amp;postdays=0&amp;postorder=asc&amp;start=0</del></td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">&#160;</td><td>+</td><td style="background: #cfc; font-size: smaller;">Die folgenden Skripte entweder als Custom Script speichern oder im jffs ablegen und zum Beispiel per <ins style="color: red; font-weight: bold; text-decoration: none;">cron </ins>ausführen lassen.</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">Die folgenden Skripte entweder als Custom Script speichern oder im jffs ablegen und zum Beispiel per <del style="color: red; font-weight: bold; text-decoration: none;">Cron </del>ausführen lassen.</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Bei SMTP over telnet können keine Anhänge versendet werden. </td><td> </td><td style="background: #eee; font-size: smaller;">Bei SMTP over telnet können keine Anhänge versendet werden. </td></tr> <tr><td colspan="2" align="left"><strong>Line 375:</strong></td> <td colspan="2" align="left"><strong>Line 373:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;">'''</del>Alternativ</td><td>+</td><td style="background: #cfc; font-size: smaller;">Alternativ mit Angabe von Datum und <ins style="color: red; font-weight: bold; text-decoration: none;">anschließendem </ins>Reboot des Routers.</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">mit Angabe von Datum und <del style="color: red; font-weight: bold; text-decoration: none;">anschließenden </del>Reboot des Routers.''<del style="color: red; font-weight: bold; text-decoration: none;">'</del></td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">&lt;pre&gt;</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">#!/bin/sh</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"># Skript verschickt Logfile per E-Mail</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"># script sends a given logfile to a specified mail</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"># account via SMTP and restarts router afterwards</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"># posted 2009 in DD-WRT forum</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"># thanks for help to pepe of DD-WRT forum</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">#</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"># Changelog:</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"># 01.05.09 init</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"># 09.05.09 inject logfile into DATA</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"># 10.05.09 abstracted over logfile and stuff</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">#</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"># Bugs:</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"># Won</ins>'<ins style="color: red; font-weight: bold; text-decoration: none;">t work with web.de?</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"># Won</ins>'<ins style="color: red; font-weight: bold; text-decoration: none;">t work with gmx.de?</ins></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> #!/bin/sh </del></td><td>+</td><td style="background: #cfc; font-size: smaller;"># Allgemeine Angaben</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> # Script verschickt Logfile per E-Mail </del></td><td>+</td><td style="background: #cfc; font-size: smaller;">LOGFILE=/var/log/messages</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> # script sends a given logfile to a specified mail </del></td><td>+</td><td style="background: #cfc; font-size: smaller;">MAILSERVER=&quot;smtp.mailserver.org&quot;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> # account via SMTP and restarts router afterwards </del></td><td>+</td><td style="background: #cfc; font-size: smaller;">RESET_ROUTER=/usr/sbin/reboot</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> # posted 2009 in dd-wrt forum </del></td><td>+</td><td style="background: #cfc; font-size: smaller;">DATE=&quot;`date +%u`. `date +%B` `date +%Y` `date +%R`&quot;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> # thanks for help to pepe of dd-wrt forum </del></td><td>+</td><td style="background: #cfc; font-size: smaller;">MARKER=&quot;### Report from $DATE ends here ###&quot;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> # </del></td><td>+</td><td style="background: #cfc; font-size: smaller;">&#160;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> # CHANGELOG: </del></td><td>+</td><td style="background: #cfc; font-size: smaller;"># Absenderdaten, je nach Mailserver fiktiv</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> # 01.05.09 init </del></td><td>+</td><td style="background: #cfc; font-size: smaller;">EMAIL_FROM=&quot;router@dd-wrt.com&quot;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> # 09.05.09 inject logfile into DATA </del></td><td>+</td><td style="background: #cfc; font-size: smaller;">&#160;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> # 10.05.09 abstracted over logfile and stuff </del></td><td>+</td><td style="background: #cfc; font-size: smaller;"># Empfaengerdaten</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> # </del></td><td>+</td><td style="background: #cfc; font-size: smaller;">EMAIL_TO=&quot;user@mailserver.org&quot;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> # BUGS: </del></td><td>+</td><td style="background: #cfc; font-size: smaller;">EMAIL_SUBJECT=&quot;Syslog Report $DATE&quot;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> # - may not work with web.de ? </del></td><td>+</td><td style="background: #cfc; font-size: smaller;">&#160;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> # - may not work with gmx.de ? </del></td><td>+</td><td style="background: #cfc; font-size: smaller;"># ----- Ab hier nichts mehr ändern -----&quot;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del></td><td>+</td><td style="background: #cfc; font-size: smaller;"># ----- nothing to change from here ----&quot;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del># Allgemeine Angaben </td><td>+</td><td style="background: #cfc; font-size: smaller;">&#160;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>LOGFILE=/var/log/messages </td><td>+</td><td style="background: #cfc; font-size: smaller;"># Setze Marker in Log-Datei</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>MAILSERVER=&quot;smtp.mailserver.org&quot; </td><td>+</td><td style="background: #cfc; font-size: smaller;">echo $MARKER &gt;&gt; $LOGFILE</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>RESET_ROUTER=/usr/sbin/reboot </td><td>+</td><td style="background: #cfc; font-size: smaller;">&#160;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>DATE=&quot;`date +%u`. `date +%B` `date +%Y` `date +%R`&quot; </td><td>+</td><td style="background: #cfc; font-size: smaller;"># Logfile lesen</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>MARKER=&quot;### Report from $DATE ends here ###&quot; </td><td>+</td><td style="background: #cfc; font-size: smaller;">EMAIL_content=`cat $LOGFILE`</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del></td><td>+</td><td style="background: #cfc; font-size: smaller;">&#160;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del># Absenderdaten, je nach Mailserver fiktiv </td><td>+</td><td style="background: #cfc; font-size: smaller;"># Kontaktaufnahme mit Mailserver</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>EMAIL_FROM=&quot;router@dd-wrt.com&quot; </td><td>+</td><td style="background: #cfc; font-size: smaller;">(echo HELO $MAILSERVER</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del></td><td>+</td><td style="background: #cfc; font-size: smaller;">sleep 6</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del># Empfaengerdaten </td><td>+</td><td style="background: #cfc; font-size: smaller;">echo MAIL FROM: $EMAIL_FROM</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>EMAIL_TO=&quot;user@mailserver.org&quot; </td><td>+</td><td style="background: #cfc; font-size: smaller;">sleep 1</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>EMAIL_SUBJECT=&quot;Syslog Report $DATE&quot; </td><td>+</td><td style="background: #cfc; font-size: smaller;">echo RCPT TO: $EMAIL_TO</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del></td><td>+</td><td style="background: #cfc; font-size: smaller;">sleep 1</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del># ----- Ab hier nichts mehr ändern -----&quot; </td><td>+</td><td style="background: #cfc; font-size: smaller;">echo &quot;DATA&quot;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del># ----- nothing to change from here ----&quot; </td><td>+</td><td style="background: #cfc; font-size: smaller;">sleep 1</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del></td><td>+</td><td style="background: #cfc; font-size: smaller;">echo &quot;From: $EMAIL_FROM</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del># Setze Marker in Log-Datei </td><td>+</td><td style="background: #cfc; font-size: smaller;">To: $EMAIL_TO</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>echo $MARKER &gt;&gt; $LOGFILE </td><td>+</td><td style="background: #cfc; font-size: smaller;">Subject: $EMAIL_SUBJECT</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del></td><td>+</td><td style="background: #cfc; font-size: smaller;">&#160;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del># Logfile lesen </td><td>+</td><td style="background: #cfc; font-size: smaller;">$EMAIL_content&quot;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>EMAIL_content=`cat $LOGFILE` </td><td>+</td><td style="background: #cfc; font-size: smaller;">sleep 1</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del></td><td>+</td><td style="background: #cfc; font-size: smaller;">echo '.'</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del># Kontaktaufnahme mit Mailserver </td><td>+</td><td style="background: #cfc; font-size: smaller;">sleep 1</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>(echo HELO $MAILSERVER </td><td>+</td><td style="background: #cfc; font-size: smaller;">echo QUIT) | nc $MAILSERVER 25</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>sleep 6 </td><td>+</td><td style="background: #cfc; font-size: smaller;">$RESET_ROUTER</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>echo MAIL FROM: $EMAIL_FROM </td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">&lt;/pre&gt;</ins></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>sleep 1 </td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>echo RCPT TO: $EMAIL_TO </td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>sleep 1 </td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>echo &quot;DATA&quot; </td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>sleep 1 </td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>echo &quot;From: $EMAIL_FROM </td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>To: $EMAIL_TO </td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>Subject: $EMAIL_SUBJECT </td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del></td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>$EMAIL_content&quot; </td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>sleep 1 </td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>echo '.' </td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>sleep 1 </td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>echo QUIT) | nc $MAILSERVER 25 </td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>$RESET_ROUTER </td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Anstelle von </td><td> </td><td style="background: #eee; font-size: smaller;">Anstelle von </td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>| nc $MAILSERVER 25</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">&lt;pre&gt; </ins>| nc $MAILSERVER 25<ins style="color: red; font-weight: bold; text-decoration: none;">&lt;/pre&gt;</ins></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">kann auch </td><td> </td><td style="background: #eee; font-size: smaller;">kann auch </td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>| telnet $MAILSERVER 25</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">&lt;pre&gt; </ins>| telnet $MAILSERVER 25<ins style="color: red; font-weight: bold; text-decoration: none;">&lt;/pre&gt;</ins></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">verwendet werden</td><td> </td><td style="background: #eee; font-size: smaller;">verwendet werden</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"></td><td colspan="2">&nbsp;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td colspan="2" align="left"><strong>Line 449:</strong></td> <td colspan="2" align="left"><strong>Line 446:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Hier mal eine Liste von Servern die zu funktionieren zu scheinen.</td><td> </td><td style="background: #eee; font-size: smaller;">Hier mal eine Liste von Servern die zu funktionieren zu scheinen.</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>mail.mymail.ch 25</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">*</ins>mail.mymail.ch 25</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>mail.oleco.de 25</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">*</ins>mail.oleco.de 25</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>mail.arcor.de 25</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">*</ins>mail.arcor.de 25</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>mgate.chello.at 25</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">*</ins>mgate.chello.at 25</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>mx.freenet.de 25</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">*</ins>mx.freenet.de 25</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">===Links===</td><td> </td><td style="background: #eee; font-size: smaller;">===Links===</td></tr> </table> Fri, 10 Jul 2009 00:18:23 GMT Dr. Ongo http://wiki.dd-wrt.com/wiki/index.php/Talk:Skript-Schnipsel Pepe: /* Syslog per E-Mail */ http://wiki.dd-wrt.com/wiki/index.php?title=Skript-Schnipsel&diff=25869&oldid=prev <p><span class="autocomment">Syslog per E-Mail</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 14:46, 14 June 2009</td> </tr> <tr><td colspan="2" align="left"><strong>Line 447:</strong></td> <td colspan="2" align="left"><strong>Line 447:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Sämtliche E-Mail-Daten wie Empfängeradresse, SMTP-Server, Begrüßung und Absenderadresse sind durch reale Daten zu ersetzen.</td><td> </td><td style="background: #eee; font-size: smaller;">Sämtliche E-Mail-Daten wie Empfängeradresse, SMTP-Server, Begrüßung und Absenderadresse sind durch reale Daten zu ersetzen.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Ebenso ist es ratsam, das Ganze vorher manuell zu testen, da sich nicht alle Mail-Server gleich verhalten.</td><td> </td><td style="background: #eee; font-size: smaller;">Ebenso ist es ratsam, das Ganze vorher manuell zu testen, da sich nicht alle Mail-Server gleich verhalten.</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">Hier mal eine Liste von Servern die zu funktionieren zu scheinen.</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> mail.mymail.ch 25</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> mail.oleco.de 25</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> mail.arcor.de 25</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> mgate.chello.at 25</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> mx.freenet.de 25</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">===Links===</td><td> </td><td style="background: #eee; font-size: smaller;">===Links===</td></tr> </table> Sun, 14 Jun 2009 14:46:40 GMT Pepe http://wiki.dd-wrt.com/wiki/index.php/Talk:Skript-Schnipsel Pepe: /* Syslog per E-Mail */ http://wiki.dd-wrt.com/wiki/index.php?title=Skript-Schnipsel&diff=25867&oldid=prev <p><span class="autocomment">Syslog per E-Mail</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 09:11, 13 June 2009</td> </tr> <tr><td colspan="2" align="left"><strong>Line 337:</strong></td> <td colspan="2" align="left"><strong>Line 337:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">===Syslog per E-Mail===</td><td> </td><td style="background: #eee; font-size: smaller;">===Syslog per E-Mail===</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">Das <del style="color: red; font-weight: bold; text-decoration: none;">folgende Skript </del>entweder als Custom Script speichern oder im jffs ablegen und zum Beispiel per Cron ausführen lassen.</td><td>+</td><td style="background: #cfc; font-size: smaller;">Das <ins style="color: red; font-weight: bold; text-decoration: none;">Ganze ist in Zusammenarbeit mit '''Victor F.''' erfolgreich getestet worden</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">der Passende Thread findet sich hier.</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">http://www.dd-wrt.com/phpBB2/viewtopic.php?t=53000&amp;postdays=0&amp;postorder=asc&amp;start=0</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">&#160;</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">&#160;</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">Die folgenden Skripte </ins>entweder als Custom Script speichern oder im jffs ablegen und zum Beispiel per Cron ausführen lassen.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Bei SMTP over telnet können keine Anhänge versendet werden. </td><td> </td><td style="background: #eee; font-size: smaller;">Bei SMTP over telnet können keine Anhänge versendet werden. </td></tr> <tr><td colspan="2" align="left"><strong>Line 369:</strong></td> <td colspan="2" align="left"><strong>Line 374:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">echo QUIT) | nc smtp.server 25 # hier den SMTP-Server und Port eintragen</td><td> </td><td style="background: #eee; font-size: smaller;">echo QUIT) | nc smtp.server 25 # hier den SMTP-Server und Port eintragen</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">'''Alternativ</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">mit Angabe von Datum und anschließenden Reboot des Routers.'''</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> #!/bin/sh </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> # Script verschickt Logfile per E-Mail </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> # script sends a given logfile to a specified mail </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> # account via SMTP and restarts router afterwards </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> # posted 2009 in dd-wrt forum </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> # thanks for help to pepe of dd-wrt forum </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> # </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> # CHANGELOG: </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> # 01.05.09 init </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> # 09.05.09 inject logfile into DATA </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> # 10.05.09 abstracted over logfile and stuff </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> # </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> # BUGS: </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> # - may not work with web.de ? </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> # - may not work with gmx.de ? </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> # Allgemeine Angaben </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> LOGFILE=/var/log/messages </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> MAILSERVER=&quot;smtp.mailserver.org&quot; </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> RESET_ROUTER=/usr/sbin/reboot </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> DATE=&quot;`date +%u`. `date +%B` `date +%Y` `date +%R`&quot; </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> MARKER=&quot;### Report from $DATE ends here ###&quot; </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> # Absenderdaten, je nach Mailserver fiktiv </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> EMAIL_FROM=&quot;router@dd-wrt.com&quot; </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> # Empfaengerdaten </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> EMAIL_TO=&quot;user@mailserver.org&quot; </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> EMAIL_SUBJECT=&quot;Syslog Report $DATE&quot; </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> # ----- Ab hier nichts mehr ändern -----&quot; </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> # ----- nothing to change from here ----&quot; </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> # Setze Marker in Log-Datei </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> echo $MARKER &gt;&gt; $LOGFILE </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> # Logfile lesen </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> EMAIL_content=`cat $LOGFILE` </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> # Kontaktaufnahme mit Mailserver </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> (echo HELO $MAILSERVER </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> sleep 6 </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> echo MAIL FROM: $EMAIL_FROM </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> sleep 1 </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> echo RCPT TO: $EMAIL_TO </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> sleep 1 </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> echo &quot;DATA&quot; </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> sleep 1 </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> echo &quot;From: $EMAIL_FROM </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> To: $EMAIL_TO </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> Subject: $EMAIL_SUBJECT </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> $EMAIL_content&quot; </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> sleep 1 </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> echo '.' </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> sleep 1 </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> echo QUIT) | nc $MAILSERVER 25 </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> $RESET_ROUTER </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">Anstelle von </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> | nc $MAILSERVER 25</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">kann auch </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> | telnet $MAILSERVER 25</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">verwendet werden</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Sämtliche E-Mail-Daten wie Empfängeradresse, SMTP-Server, Begrüßung und Absenderadresse sind durch reale Daten zu ersetzen.</td><td> </td><td style="background: #eee; font-size: smaller;">Sämtliche E-Mail-Daten wie Empfängeradresse, SMTP-Server, Begrüßung und Absenderadresse sind durch reale Daten zu ersetzen.</td></tr> </table> Sat, 13 Jun 2009 09:11:54 GMT Pepe http://wiki.dd-wrt.com/wiki/index.php/Talk:Skript-Schnipsel Dr. Ongo: /* Syslog per E-Mail */ http://wiki.dd-wrt.com/wiki/index.php?title=Skript-Schnipsel&diff=25828&oldid=prev <p><span class="autocomment">Syslog per E-Mail</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 08:42, 11 June 2009</td> </tr> <tr><td colspan="2" align="left"><strong>Line 349:</strong></td> <td colspan="2" align="left"><strong>Line 349:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">EMAIL_SUBJECT=&quot;Betreff&quot;</td><td> </td><td style="background: #eee; font-size: smaller;">EMAIL_SUBJECT=&quot;Betreff&quot;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"># Was soll in der <del style="color: red; font-weight: bold; text-decoration: none;">Mai </del>stehen?</td><td>+</td><td style="background: #cfc; font-size: smaller;"># Was soll in der <ins style="color: red; font-weight: bold; text-decoration: none;">Mail </ins>stehen?</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">EMAIL_content=´cat /var/log/messages´ #z. B. das Syslog</td><td> </td><td style="background: #eee; font-size: smaller;">EMAIL_content=´cat /var/log/messages´ #z. B. das Syslog</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td colspan="2" align="left"><strong>Line 370:</strong></td> <td colspan="2" align="left"><strong>Line 370:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">Sämtliche <del style="color: red; font-weight: bold; text-decoration: none;">Email</del>-Daten wie Empfängeradresse, SMTP-Server, Begrüßung und Absenderadresse sind durch reale Daten zu ersetzen.</td><td>+</td><td style="background: #cfc; font-size: smaller;">Sämtliche <ins style="color: red; font-weight: bold; text-decoration: none;">E-Mail</ins>-Daten wie Empfängeradresse, SMTP-Server, Begrüßung und Absenderadresse sind durch reale Daten zu ersetzen.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Ebenso ist es ratsam, das Ganze vorher manuell zu testen, da sich nicht alle Mail-Server gleich verhalten.</td><td> </td><td style="background: #eee; font-size: smaller;">Ebenso ist es ratsam, das Ganze vorher manuell zu testen, da sich nicht alle Mail-Server gleich verhalten.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> </table> Thu, 11 Jun 2009 08:42:45 GMT Dr. Ongo http://wiki.dd-wrt.com/wiki/index.php/Talk:Skript-Schnipsel Dr. Ongo: /* Drahtlose Schnipsel */ http://wiki.dd-wrt.com/wiki/index.php?title=Skript-Schnipsel&diff=25826&oldid=prev <p><span class="autocomment">Drahtlose Schnipsel</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 07:15, 11 June 2009</td> </tr> <tr><td colspan="2" align="left"><strong>Line 1:</strong></td> <td colspan="2" align="left"><strong>Line 1:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">===Drahtlose Schnipsel===</td><td> </td><td style="background: #eee; font-size: smaller;">===Drahtlose Schnipsel===</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">====wl====</td><td> </td><td style="background: #eee; font-size: smaller;">====wl====</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">Die meisten <del style="color: red; font-weight: bold; text-decoration: none;">wireless</del>-Optionen können über das Programm &quot;wl&quot; auch über die Konsole eingestellt und überwacht werden&lt;br&gt;</td><td>+</td><td style="background: #cfc; font-size: smaller;">Die meisten <ins style="color: red; font-weight: bold; text-decoration: none;">Wireless</ins>-Optionen können über das Programm &quot;wl&quot; auch über die Konsole eingestellt und überwacht werden&lt;br&gt;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Eine Übersicht über alle wl-Komandos erhält man mit der Eingabe von:</td><td> </td><td style="background: #eee; font-size: smaller;">Eine Übersicht über alle wl-Komandos erhält man mit der Eingabe von:</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;pre&gt;</td></tr> <tr><td colspan="2" align="left"><strong>Line 83:</strong></td> <td colspan="2" align="left"><strong>Line 83:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Jetzt kann es natürlich unübersichtlich werden ...</td><td> </td><td style="background: #eee; font-size: smaller;">Jetzt kann es natürlich unübersichtlich werden ...</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">Das Programm &quot;grep&quot; hilft bei der Auswahl von Zeilen, die den <del style="color: red; font-weight: bold; text-decoration: none;">gewünschen </del>Informationsgehalt besitzen&lt;br&gt;</td><td>+</td><td style="background: #cfc; font-size: smaller;">Das Programm &quot;grep&quot; hilft bei der Auswahl von Zeilen, die den <ins style="color: red; font-weight: bold; text-decoration: none;">gewünschten </ins>Informationsgehalt besitzen&lt;br&gt;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Hier wird nach &lt;i&gt;SSID: &lt;/i&gt; und &lt;i&gt;Mode:&lt;/i&gt; gesucht</td><td> </td><td style="background: #eee; font-size: smaller;">Hier wird nach &lt;i&gt;SSID: &lt;/i&gt; und &lt;i&gt;Mode:&lt;/i&gt; gesucht</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;pre&gt;</td></tr> <tr><td colspan="2" align="left"><strong>Line 122:</strong></td> <td colspan="2" align="left"><strong>Line 122:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">done</td><td> </td><td style="background: #eee; font-size: smaller;">done</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">#Ergibt:</td><td> </td><td style="background: #eee; font-size: smaller;">#Ergibt:</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">MAC=00:FB:DD:11:22:33 Kanal : Rate=11 RSSI=-77 Noise=-91 SNR=14</td><td>+</td><td style="background: #cfc; font-size: smaller;">MAC=00:FB:DD:11:22:33 Kanal: Rate=11 RSSI=-77 Noise=-91 SNR=14</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">Die Idee zum letzten Schnipsel stammt von [http://www.vorhauer.homepage.t-online.de/firmware.htm hier]</td><td>+</td><td style="background: #cfc; font-size: smaller;">Die Idee zum letzten Schnipsel stammt von [http://www.vorhauer.homepage.t-online.de/firmware.htm hier]<ins style="color: red; font-weight: bold; text-decoration: none;">.</ins></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">====Welche IP-Adressen haben die Wireless-Clients?====</td><td> </td><td style="background: #eee; font-size: smaller;">====Welche IP-Adressen haben die Wireless-Clients?====</td></tr> </table> Thu, 11 Jun 2009 07:15:10 GMT Dr. Ongo http://wiki.dd-wrt.com/wiki/index.php/Talk:Skript-Schnipsel Dr. Ongo: /* Syslog per E-Mail */ Verschoben von Syslog Per Mail!‎ http://wiki.dd-wrt.com/wiki/index.php?title=Skript-Schnipsel&diff=25823&oldid=prev <p><span class="autocomment">Syslog per E-Mail -</span> Verschoben von <a href="/wiki/index.php?title=Syslog_Per_Mail%21&amp;action=edit" class="new" title="Syslog Per Mail!">Syslog Per Mail!‎</a></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 07:04, 11 June 2009</td> </tr> <tr><td colspan="2" align="left"><strong>Line 308:</strong></td> <td colspan="2" align="left"><strong>Line 308:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">while read a; do </td><td> </td><td style="background: #eee; font-size: smaller;">while read a; do </td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> echo $a &gt;&gt; body.$$</td><td> </td><td style="background: #eee; font-size: smaller;"> echo $a &gt;&gt; body.$$</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>done</td><td>+</td><td style="background: #cfc; font-size: smaller;">done</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">while getopts s:r:m:h: name; do</td><td> </td><td style="background: #eee; font-size: smaller;">while getopts s:r:m:h: name; do</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> case $name in</td><td> </td><td style="background: #eee; font-size: smaller;"> case $name in</td></tr> <tr><td colspan="2" align="left"><strong>Line 335:</strong></td> <td colspan="2" align="left"><strong>Line 335:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">rm body.$$</td><td> </td><td style="background: #eee; font-size: smaller;">rm body.$$</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">===Syslog per E-Mail===</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">Das folgende Skript entweder als Custom Script speichern oder im jffs ablegen und zum Beispiel per Cron ausführen lassen.</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">Bei SMTP over telnet können keine Anhänge versendet werden. </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">Syslog muss eingeschaltet sein.</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">&lt;pre&gt;</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">#!/bin/sh</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">EMAIL_TO=&quot;Empfängeradresse&quot;</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">EMAIL_SUBJECT=&quot;Betreff&quot;</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"># Was soll in der Mai stehen?</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">EMAIL_content=´cat /var/log/messages´ #z. B. das Syslog</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"># HELO oder EHLO benutzen je nach Mailserver.</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">(echo HELO &lt;Begrüßung am Mail-Server&gt; #z. B. t-online.de</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">sleep 3</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">echo MAIL FROM: Absenderadresse</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">sleep 1</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">echo RCPT TO: $EMAIL_TO</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">sleep 1</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">echo &quot;DATA</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">From: Absenderadresse</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">To: $EMAIL_TO</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">Subject: $EMAIL_SUBJECT</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">$EMAIL_content&quot;</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">sleep 1</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">echo '.'</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">sleep 1</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">echo QUIT) | nc smtp.server 25 # hier den SMTP-Server und Port eintragen</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">&lt;/pre&gt;</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">Sämtliche Email-Daten wie Empfängeradresse, SMTP-Server, Begrüßung und Absenderadresse sind durch reale Daten zu ersetzen.</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">Ebenso ist es ratsam, das Ganze vorher manuell zu testen, da sich nicht alle Mail-Server gleich verhalten.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">===Links===</td><td> </td><td style="background: #eee; font-size: smaller;">===Links===</td></tr> </table> Thu, 11 Jun 2009 07:04:36 GMT Dr. Ongo http://wiki.dd-wrt.com/wiki/index.php/Talk:Skript-Schnipsel Dr. Ongo at 17:37, 9 June 2009 http://wiki.dd-wrt.com/wiki/index.php?title=Skript-Schnipsel&diff=25799&oldid=prev <p></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 17:37, 9 June 2009</td> </tr> <tr><td colspan="2" align="left"><strong>Line 1:</strong></td> <td colspan="2" align="left"><strong>Line 1:</strong></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">===<del style="color: red; font-weight: bold; text-decoration: none;">drahtlose </del>Schnipsel===</td><td>+</td><td style="background: #cfc; font-size: smaller;">===<ins style="color: red; font-weight: bold; text-decoration: none;">Drahtlose </ins>Schnipsel===</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">====wl====</td><td> </td><td style="background: #eee; font-size: smaller;">====wl====</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">Die meisten wireless-Optionen können über das Programm &quot;wl&quot; auch über die <del style="color: red; font-weight: bold; text-decoration: none;">Console </del>eingestellt und überwacht werden&lt;br&gt;</td><td>+</td><td style="background: #cfc; font-size: smaller;">Die meisten wireless-Optionen können über das Programm &quot;wl&quot; auch über die <ins style="color: red; font-weight: bold; text-decoration: none;">Konsole </ins>eingestellt und überwacht werden&lt;br&gt;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">Eine Übersicht über alle wl- <del style="color: red; font-weight: bold; text-decoration: none;">Comandos </del>erhält man mit der Eingabe von:</td><td>+</td><td style="background: #cfc; font-size: smaller;">Eine Übersicht über alle wl-<ins style="color: red; font-weight: bold; text-decoration: none;">Komandos </ins>erhält man mit der Eingabe von:</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;pre&gt;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">~ # wl cmds</td><td> </td><td style="background: #eee; font-size: smaller;">~ # wl cmds</td></tr> <tr><td colspan="2" align="left"><strong>Line 47:</strong></td> <td colspan="2" align="left"><strong>Line 47:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">Dieses Programm beherrscht weit mehr Optionen als <del style="color: red; font-weight: bold; text-decoration: none;">der </del>WRT überhaupt verarbeiten kann.&lt;br&gt;</td><td>+</td><td style="background: #cfc; font-size: smaller;">Dieses Programm beherrscht weit mehr Optionen als WRT überhaupt verarbeiten kann.&lt;br&gt;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Einige Befehle können nur im Client-Modus und andere nur im AP-Modus verwendet werden.</td><td> </td><td style="background: #eee; font-size: smaller;">Einige Befehle können nur im Client-Modus und andere nur im AP-Modus verwendet werden.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td colspan="2" align="left"><strong>Line 54:</strong></td> <td colspan="2" align="left"><strong>Line 54:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;i&gt;Was machts?&lt;/i&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;i&gt;Was machts?&lt;/i&gt;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Das drahtlose Netzwerk wird im über alle Kanäle gescannt, nach eine Pause von 5 Sekunden wird der Bildschirm gelöscht, und das Ergebnis des Scanns ausgegeben.&lt;br&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">Das drahtlose Netzwerk wird im über alle Kanäle gescannt, nach eine Pause von 5 Sekunden wird der Bildschirm gelöscht, und das Ergebnis des Scanns ausgegeben.&lt;br&gt;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">Mit der Tastenkombination Strg <del style="color: red; font-weight: bold; text-decoration: none;"> </del>C kann das <del style="color: red; font-weight: bold; text-decoration: none;">Script </del>beendet werden. </td><td>+</td><td style="background: #cfc; font-size: smaller;">Mit der Tastenkombination Strg<ins style="color: red; font-weight: bold; text-decoration: none;">-</ins>C kann das <ins style="color: red; font-weight: bold; text-decoration: none;">Skript </ins>beendet werden. </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">&lt;pre&gt;</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">#!/bin/sh</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">while [ 1 ]; do</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> wl scan</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> sleep 5</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> clear</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> wl scanresults</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">done</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">&lt;/pre&gt;</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">Ausgabe:</ins></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;pre&gt;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">while [ 1 ];</td><td colspan="2">&nbsp;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"> do</td><td colspan="2">&nbsp;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"> wl scan ;</td><td colspan="2">&nbsp;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"> sleep 5;</td><td colspan="2">&nbsp;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"> clear;</td><td colspan="2">&nbsp;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"> wl scanresults;</td><td colspan="2">&nbsp;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"> done;</td><td colspan="2">&nbsp;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"></td><td colspan="2">&nbsp;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Mode: Managed RSSI: -76 dBm noise: -93 dBm Channel: 10</td><td> </td><td style="background: #eee; font-size: smaller;">Mode: Managed RSSI: -76 dBm noise: -93 dBm Channel: 10</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">BSSID: 00:FB:DD:11:22:33 Capability: ESS</td><td> </td><td style="background: #eee; font-size: smaller;">BSSID: 00:FB:DD:11:22:33 Capability: ESS</td></tr> <tr><td colspan="2" align="left"><strong>Line 73:</strong></td> <td colspan="2" align="left"><strong>Line 75:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">BSSID: 11:22:33:50:45:FE Capability: ESS</td><td> </td><td style="background: #eee; font-size: smaller;">BSSID: 11:22:33:50:45:FE Capability: ESS</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Supported Rates: [ 1(b) 2(b) 5.5(b) 11(b) ]</td><td> </td><td style="background: #eee; font-size: smaller;">Supported Rates: [ 1(b) 2(b) 5.5(b) 11(b) ]</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"></td><td colspan="2">&nbsp;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"></td><td colspan="2">&nbsp;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">Um auch die versteckten Netzwerke angezeigt zu bekommen, kann man den Scanner in den <del style="color: red; font-weight: bold; text-decoration: none;">monitor </del>und <del style="color: red; font-weight: bold; text-decoration: none;">passive </del>Modus versetzen. Die zweite SSID ist übrigends eine Turbo-Cell</td><td>+</td><td style="background: #cfc; font-size: smaller;">Um auch die versteckten Netzwerke angezeigt zu bekommen, kann man den Scanner in den <ins style="color: red; font-weight: bold; text-decoration: none;">Monitor- </ins>und <ins style="color: red; font-weight: bold; text-decoration: none;">passiven </ins>Modus versetzen. Die zweite SSID ist übrigends eine Turbo-Cell</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;pre&gt;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">~ # wl monitor 1</td><td> </td><td style="background: #eee; font-size: smaller;">~ # wl monitor 1</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">~ # wl passive 1</td><td> </td><td style="background: #eee; font-size: smaller;">~ # wl passive 1</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">Jetzt kann es natürlich unübersichtlich werden<del style="color: red; font-weight: bold; text-decoration: none;">..</del>...</td><td>+</td><td style="background: #cfc; font-size: smaller;">Jetzt kann es natürlich unübersichtlich werden ...</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Das Programm &quot;grep&quot; hilft bei der Auswahl von Zeilen, die den gewünschen Informationsgehalt besitzen&lt;br&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">Das Programm &quot;grep&quot; hilft bei der Auswahl von Zeilen, die den gewünschen Informationsgehalt besitzen&lt;br&gt;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Hier wird nach &lt;i&gt;SSID: &lt;/i&gt; und &lt;i&gt;Mode:&lt;/i&gt; gesucht</td><td> </td><td style="background: #eee; font-size: smaller;">Hier wird nach &lt;i&gt;SSID: &lt;/i&gt; und &lt;i&gt;Mode:&lt;/i&gt; gesucht</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;pre&gt;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">while [ 1 ];</td><td>+</td><td style="background: #cfc; font-size: smaller;">while [ 1 ]; do</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>do</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> </ins>wl scan</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>wl scan <del style="color: red; font-weight: bold; text-decoration: none;">;</del></td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> </ins>sleep 5</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>sleep 5<del style="color: red; font-weight: bold; text-decoration: none;">;</del></td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> </ins>clear</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>clear<del style="color: red; font-weight: bold; text-decoration: none;">;</del></td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> </ins>wl scanresults | grep 'SSID: &quot;\|Mode:'</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>wl scanresults | grep 'SSID: &quot;\|Mode:'<del style="color: red; font-weight: bold; text-decoration: none;">;</del></td><td>+</td><td style="background: #cfc; font-size: smaller;">done</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>done<del style="color: red; font-weight: bold; text-decoration: none;">;</del></td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Das Ergebnis sieht dann so aus:</td><td> </td><td style="background: #eee; font-size: smaller;">Das Ergebnis sieht dann so aus:</td></tr> <tr><td colspan="2" align="left"><strong>Line 112:</strong></td> <td colspan="2" align="left"><strong>Line 111:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Mich interessiert also nur dieser.</td><td> </td><td style="background: #eee; font-size: smaller;">Mich interessiert also nur dieser.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;pre&gt;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">while [ 1 ];</td><td>+</td><td style="background: #cfc; font-size: smaller;">while [ 1 ]; do</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">do</td><td>+</td><td style="background: #cfc; font-size: smaller;"> CHANNEL=$(wl channel | grep target | cut -c16- )</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"> CHANNEL=$(wl channel | grep target | cut -c16- )<del style="color: red; font-weight: bold; text-decoration: none;">;</del></td><td>+</td><td style="background: #cfc; font-size: smaller;"> MAC=$(wl assoclist|cut -d' ' -f2 )</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"> MAC=$(wl assoclist|cut -d' ' -f2 )<del style="color: red; font-weight: bold; text-decoration: none;">;</del></td><td>+</td><td style="background: #cfc; font-size: smaller;"> RATE=$(wl rate|cut -d' ' -f3 )</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"> RATE=$(wl rate|cut -d' ' -f3 )<del style="color: red; font-weight: bold; text-decoration: none;">;</del></td><td>+</td><td style="background: #cfc; font-size: smaller;"> RSSI=$(wl rssi|cut -d' ' -f3 )</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"> RSSI=$(wl rssi|cut -d' ' -f3 )<del style="color: red; font-weight: bold; text-decoration: none;">;</del></td><td>+</td><td style="background: #cfc; font-size: smaller;"> NOISE=$(wl noise|cut -d' ' -f3 )</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"> NOISE=$(wl noise|cut -d' ' -f3 )<del style="color: red; font-weight: bold; text-decoration: none;">;</del></td><td>+</td><td style="background: #cfc; font-size: smaller;"> let SNR=&quot;$RSSI- $NOISE&quot;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"> let SNR=&quot;$RSSI- $NOISE&quot;<del style="color: red; font-weight: bold; text-decoration: none;">;</del></td><td>+</td><td style="background: #cfc; font-size: smaller;"> clear</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"> clear<del style="color: red; font-weight: bold; text-decoration: none;">;</del></td><td>+</td><td style="background: #cfc; font-size: smaller;"> echo &quot;MAC=$MAC Kanal $CHANNEL: Rate=$RATE RSSI=$RSSI Noise=$NOISE SNR=$SNR&quot;; sleep 5</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"> echo &quot;MAC=$MAC Kanal $CHANNEL: Rate=$RATE RSSI=$RSSI Noise=$NOISE SNR=$SNR&quot;; sleep 5<del style="color: red; font-weight: bold; text-decoration: none;">;</del></td><td>+</td><td style="background: #cfc; font-size: smaller;">done</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">done<del style="color: red; font-weight: bold; text-decoration: none;">;</del></td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">#Ergibt:</td><td> </td><td style="background: #eee; font-size: smaller;">#Ergibt:</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">MAC=00:FB:DD:11:22:33 Kanal : Rate=11 RSSI=-77 Noise=-91 SNR=14</td><td> </td><td style="background: #eee; font-size: smaller;">MAC=00:FB:DD:11:22:33 Kanal : Rate=11 RSSI=-77 Noise=-91 SNR=14</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"></td><td colspan="2">&nbsp;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Die Idee zum letzten Schnipsel stammt von [http://www.vorhauer.homepage.t-online.de/firmware.htm hier]</td><td> </td><td style="background: #eee; font-size: smaller;">Die Idee zum letzten Schnipsel stammt von [http://www.vorhauer.homepage.t-online.de/firmware.htm hier]</td></tr> <tr><td colspan="2" align="left"><strong>Line 154:</strong></td> <td colspan="2" align="left"><strong>Line 151:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> # echo &quot;&lt;meta http-equiv=&quot;refresh&quot; content=&quot;10&quot;&gt;&lt;b&gt;Host names and IP addresses of WLAN clients&lt;/b&gt; (last update: $(date))&lt;p&gt;&quot; &gt; /tmp/www/wlan.html</td><td> </td><td style="background: #eee; font-size: smaller;"> # echo &quot;&lt;meta http-equiv=&quot;refresh&quot; content=&quot;10&quot;&gt;&lt;b&gt;Host names and IP addresses of WLAN clients&lt;/b&gt; (last update: $(date))&lt;p&gt;&quot; &gt; /tmp/www/wlan.html</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> while read assocLINE; do</td><td> </td><td style="background: #eee; font-size: smaller;"> while read assocLINE; do</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>dumpleases | awk 'BEGIN IGNORECASE=1; /'&quot;$assocLINE&quot;'/ {print &quot;Host name: &quot; $1, &quot;MAC: &quot; $2, &quot;IP: &quot; $3}'</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> </ins>dumpleases | awk 'BEGIN IGNORECASE=1; /'&quot;$assocLINE&quot;'/ {print &quot;Host name: &quot; $1, &quot;MAC: &quot; $2, &quot;IP: &quot; $3}'</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del># echo &quot;&lt;br&gt;&quot;;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> </ins># echo &quot;&lt;br&gt;&quot;;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> done &lt; /tmp/assocLIST # &gt;&gt; /tmp/www/wlan.html</td><td> </td><td style="background: #eee; font-size: smaller;"> done &lt; /tmp/assocLIST # &gt;&gt; /tmp/www/wlan.html</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"> sleep 10<del style="color: red; font-weight: bold; text-decoration: none;">;</del></td><td>+</td><td style="background: #cfc; font-size: smaller;"> sleep 10</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">done</td><td> </td><td style="background: #eee; font-size: smaller;">done</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td></tr> <tr><td colspan="2" align="left"><strong>Line 266:</strong></td> <td colspan="2" align="left"><strong>Line 263:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">Das <del style="color: red; font-weight: bold; text-decoration: none;">ganze </del>findet man dann unter http://routerIP/user/traffic.htm</td><td>+</td><td style="background: #cfc; font-size: smaller;">Das <ins style="color: red; font-weight: bold; text-decoration: none;">Ganze </ins>findet man dann unter http://routerIP/user/traffic.htm</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">''Wie kann ich dieses Dokument schützen? Ich möchte, dass man es nur anschauen kann, wenn man im Web interface eingeloggt ist. Kann das hier jemand schreiben?''</td><td> </td><td style="background: #eee; font-size: smaller;">''Wie kann ich dieses Dokument schützen? Ich möchte, dass man es nur anschauen kann, wenn man im Web interface eingeloggt ist. Kann das hier jemand schreiben?''</td></tr> <tr><td colspan="2" align="left"><strong>Line 275:</strong></td> <td colspan="2" align="left"><strong>Line 272:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">==== Anzeige der maximalen Verbindungen ====</td><td> </td><td style="background: #eee; font-size: smaller;">==== Anzeige der maximalen Verbindungen ====</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Mit folgendem Schnipsel kann man sich die Anzahl der aufgebauten Verbindungen anzeigen lassen:</td><td> </td><td style="background: #eee; font-size: smaller;">Mit folgendem Schnipsel kann man sich die Anzahl der aufgebauten Verbindungen anzeigen lassen:</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">&lt;<del style="color: red; font-weight: bold; text-decoration: none;">pre</del>&gt;wc -l &lt; /proc/net/ip_conntrack&lt;/<del style="color: red; font-weight: bold; text-decoration: none;">pre</del>&gt;</td><td>+</td><td style="background: #cfc; font-size: smaller;">&lt;<ins style="color: red; font-weight: bold; text-decoration: none;">code</ins>&gt;wc -l &lt; /proc/net/ip_conntrack&lt;/<ins style="color: red; font-weight: bold; text-decoration: none;">code</ins>&gt;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">wenn man sich nur für einen Port oder einen Portrange interessiert, geht das wie folgt:</td><td> </td><td style="background: #eee; font-size: smaller;">wenn man sich nur für einen Port oder einen Portrange interessiert, geht das wie folgt:</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;">&lt;pre&gt;</del>Einzelner Port:</td><td>+</td><td style="background: #cfc; font-size: smaller;">Einzelner Port:</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">grep 4661 /proc/net/ip_conntrack | wc -l</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">&lt;code&gt;</ins>grep 4661 /proc/net/ip_conntrack | wc -l<ins style="color: red; font-weight: bold; text-decoration: none;">&lt;/code&gt;</ins></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Portrange:</td><td> </td><td style="background: #eee; font-size: smaller;">Portrange:</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">grep 46[61-72] /proc/net/ip_conntrack | wc -l&lt;/<del style="color: red; font-weight: bold; text-decoration: none;">pre</del>&gt;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">&lt;code&gt;</ins>grep 46[61-72] /proc/net/ip_conntrack | wc -l&lt;/<ins style="color: red; font-weight: bold; text-decoration: none;">code</ins>&gt;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">===Idle Time umgehen===</td><td> </td><td style="background: #eee; font-size: smaller;">===Idle Time umgehen===</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">Falls man vom Provider getrennt wird, wenn man keinen <del style="color: red; font-weight: bold; text-decoration: none;">traffic </del>erzeugt:</td><td>+</td><td style="background: #cfc; font-size: smaller;">Falls man vom Provider getrennt wird, wenn man keinen <ins style="color: red; font-weight: bold; text-decoration: none;">Traffic </ins>erzeugt:</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;pre&gt;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>while [ 1 ];</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">#!/bin/sh</ins></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>do</td><td>+</td><td style="background: #cfc; font-size: smaller;">while [ 1 ]; do</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>ping -c 5 www.example.com &gt; /dev/null # ping 5 packets</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> </ins>ping -c 5 www.example.com &gt; /dev/null # ping 5 packets</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>sleep 300<del style="color: red; font-weight: bold; text-decoration: none;">; </del># wait 5 minutes</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> </ins>sleep 300 <ins style="color: red; font-weight: bold; text-decoration: none;"> </ins># wait 5 minutes</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>done<del style="color: red; font-weight: bold; text-decoration: none;">;</del></td><td>+</td><td style="background: #cfc; font-size: smaller;">done</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Falls dieses nicht funktioniert (der Provider ignoriert ICMP Pakete) dann benutze:</td><td> </td><td style="background: #eee; font-size: smaller;">Falls dieses nicht funktioniert (der Provider ignoriert ICMP Pakete) dann benutze:</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;pre&gt;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>while [ 1 ];</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">#!/bin/sh</ins></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>do</td><td>+</td><td style="background: #cfc; font-size: smaller;">while [ 1 ]; do</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>wget http://www.example.com/ -O /tmp/index -q # download index file</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> </ins>wget http://www.example.com/ -O /tmp/index -q # download index file</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>sleep 300<del style="color: red; font-weight: bold; text-decoration: none;">; </del># wait 5 minutes</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> </ins>sleep 300 <ins style="color: red; font-weight: bold; text-decoration: none;"> </ins># wait 5 minutes</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>done<del style="color: red; font-weight: bold; text-decoration: none;">;</del></td><td>+</td><td style="background: #cfc; font-size: smaller;">done</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;/pre&gt;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">===Kleines Sendmail Programm (<del style="color: red; font-weight: bold; text-decoration: none;">noch keine </del>Fehlerabhandlung<del style="color: red; font-weight: bold; text-decoration: none;">!!!</del>)===</td><td>+</td><td style="background: #cfc; font-size: smaller;">===Kleines Sendmail<ins style="color: red; font-weight: bold; text-decoration: none;">-</ins>Programm (<ins style="color: red; font-weight: bold; text-decoration: none;">ohne </ins>Fehlerabhandlung)===</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">Falls man keine Lust hat ein Sendmail-Programm zu installieren.</td><td>+</td><td style="background: #cfc; font-size: smaller;">Falls man keine Lust hat<ins style="color: red; font-weight: bold; text-decoration: none;">, </ins>ein Sendmail-Programm zu installieren.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">&lt;pre&gt;</td><td> </td><td style="background: #eee; font-size: smaller;">&lt;pre&gt;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">#!/bin/sh</td><td> </td><td style="background: #eee; font-size: smaller;">#!/bin/sh</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">while read a; do </td><td> </td><td style="background: #eee; font-size: smaller;">while read a; do </td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">echo $a &gt;&gt; body.$$</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> </ins>echo $a &gt;&gt; body.$$</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">done</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> </ins>done</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">while getopts s:r:m:h: name</td><td>+</td><td style="background: #cfc; font-size: smaller;">while getopts s:r:m:h: name<ins style="color: red; font-weight: bold; text-decoration: none;">; </ins>do</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">do</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> </ins>case $name in</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>case $name in</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> </ins>s) server=&quot;$OPTARG&quot;;;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>s) server=&quot;$OPTARG&quot;;;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> </ins>r) rec=&quot;$OPTARG&quot;;;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>r) rec=&quot;$OPTARG&quot;;;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> </ins>m) mailer=&quot;$OPTARG&quot;;;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>m) mailer=&quot;$OPTARG&quot;;;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> </ins>h) subject=&quot;$OPTARG&quot;;;</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del>h) subject=&quot;$OPTARG&quot;;;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> </ins>esac</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">esac</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">done</td><td> </td><td style="background: #eee; font-size: smaller;">done</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">#echo $server</td><td> </td><td style="background: #eee; font-size: smaller;">#echo $server</td></tr> <tr><td colspan="2" align="left"><strong>Line 341:</strong></td> <td colspan="2" align="left"><strong>Line 337:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">===Links===</td><td> </td><td style="background: #eee; font-size: smaller;">===Links===</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;">selbe </del>Kategorie im [http://www.dd-wrt.com/wiki/index.php/Script_Examples <del style="color: red; font-weight: bold; text-decoration: none;">engl. </del>Wiki]</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">Dieselbe </ins>Kategorie im [http://www.dd-wrt.com/wiki/index.php/Script_Examples <ins style="color: red; font-weight: bold; text-decoration: none;">englischen </ins>Wiki]</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">[[Category:Deutsche Dokumentation]]</td><td> </td><td style="background: #eee; font-size: smaller;">[[Category:Deutsche Dokumentation]]</td></tr> </table> Tue, 09 Jun 2009 17:37:13 GMT Dr. Ongo http://wiki.dd-wrt.com/wiki/index.php/Talk:Skript-Schnipsel