<?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>webstersprodigy.net &#187; Linux</title>
	<atom:link href="http://webstersprodigy.net/category/computers/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://webstersprodigy.net</link>
	<description>Me trying to learn how to use a computer</description>
	<lastBuildDate>Sat, 04 Feb 2012 01:17:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>chromium for linux upgraded to stable (only by me)</title>
		<link>http://webstersprodigy.net/2009/08/chromium-for-linux-upgraded-to-stable-only-by-me/</link>
		<comments>http://webstersprodigy.net/2009/08/chromium-for-linux-upgraded-to-stable-only-by-me/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 18:59:25 +0000</pubDate>
		<dc:creator>webstersprodigy</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://webstersprodigy.net/?p=620</guid>
		<description><![CDATA[I&#8217;ve made chrome my default linux browser. It&#8217;s been performing very well&#8230; The thing is, flash on linux is unstable, gosh darn adobe! I have ff crash about every few days due to something like google finance. No more! The separate processes of chrome isolate this somewhat. So although it&#8217;s still &#8220;unstable&#8221; it seems to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve made chrome my default linux browser. It&#8217;s been performing very well&#8230;</p>
<p>The thing is, flash on linux is unstable, gosh darn adobe! I have ff crash about every few days due to something like google finance. No more! The separate processes of chrome isolate this somewhat. So although it&#8217;s still &#8220;unstable&#8221; it seems to be more reliable than firefox &#8211; mostly due to flash. See http://www.howtoforge.com/how-to-enable-adobes-flash-player-in-google-chrome-ubuntu-9.04 &#8211; this is exactly what I did, though I didn&#8217;t find the tutorial until later</p>
<p><a href="http://webstersprodigy.net/wp-content/uploads/2009/08/chrome.png"><img class="alignnone size-full wp-image-621" title="chrome" src="http://webstersprodigy.net/wp-content/uploads/2009/08/chrome.png" alt="chrome" width="800" height="498" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://webstersprodigy.net/2009/08/chromium-for-linux-upgraded-to-stable-only-by-me/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>GPG Cheat Sheet</title>
		<link>http://webstersprodigy.net/2009/07/gpg-cheat-sheet/</link>
		<comments>http://webstersprodigy.net/2009/07/gpg-cheat-sheet/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 05:16:24 +0000</pubDate>
		<dc:creator>webstersprodigy</dc:creator>
				<category><![CDATA[GrayHat]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://webstersprodigy.net/?p=580</guid>
		<description><![CDATA[The gnu Privacy handbook has a ton of useful information, but I thought I&#8217;d make a quick reference for the gpg usage I use most. Especially because I was just an idiot and lost my gpg private key (though I do remember the passphrase) &#8211; this time there will be a backup! List all keys [...]]]></description>
			<content:encoded><![CDATA[<p>The gnu Privacy handbook has a ton of useful information, but I thought I&#8217;d make a quick reference for the gpg usage I use most. Especially because I was just an idiot and lost my gpg private key (though I do remember the passphrase) &#8211; this time there will be a backup!</p>
<p>List all keys</p>
<blockquote><p>gpg &#8211;list-keys</p></blockquote>
<p>print key to a file (mypublickey) &#8211; &lt;keyid&gt; is listed when you do list-keys</p>
<blockquote><p>gpg -ao mypublickey.key &#8211;export &lt;keyid&gt;</p></blockquote>
<p>show secret keys</p>
<blockquote><p>gpg &#8211;list-secret-keys</p></blockquote>
<p>backup secret keys</p>
<blockquote><p>gpg -a &#8211;export-secret-keys &lt;keyid&gt; | gpg-aco myprivatkeyfile.key.gpg</p></blockquote>
<p>Restoring the key</p>
<blockquote><p>gpg &#8211;import {keyfile}</p></blockquote>
<p>Restore an encrypted key</p>
<blockquote><p>gpg &#8211;decrypt {privatekeyfile} | gpg &#8211;import</p></blockquote>
<p>Sign a file</p>
<blockquote><p>gpg &#8211;output doc.sig &#8211;sign doc</p></blockquote>
<p>verify signature</p>
<blockquote><p>gpg &#8211;output mydoc &#8211;decrypt doc.sig</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://webstersprodigy.net/2009/07/gpg-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>execv-like system call</title>
		<link>http://webstersprodigy.net/2009/06/execv-like-system-call/</link>
		<comments>http://webstersprodigy.net/2009/06/execv-like-system-call/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 15:54:38 +0000</pubDate>
		<dc:creator>webstersprodigy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[C]]></category>

		<guid isPermaLink="false">http://webstersprodigy.net/?p=569</guid>
		<description><![CDATA[From the system man page, it explicitely says: Do not use system() from a program with set-user-ID or set-group-ID privileges, because strange values for some environment variables might be used to subvert system integrity. Good advice, but sometimes you need to get stuff done anyway. This is experimenting with pam and execv from a stupid [...]]]></description>
			<content:encoded><![CDATA[<p>From the system man page, it explicitely says:</p>
<blockquote><p>Do not use <strong>system</strong>() from a program with set-user-ID or set-group-ID privileges, because strange values for some environment variables might be used to subvert system integrity.</p></blockquote>
<p>Good advice, but sometimes you need to get stuff done anyway. This is experimenting with pam and execv from a stupid google apps pam module I wrote</p>
<pre class="brush: cpp; title: ; notranslate">
  PID = fork();
  if (PID == 0) {
    //child
    char* argvarray[4] = {progarg0, username, newpass, (char *) 0};
    execv(netprog, argvarray);
    if (debug == 1)
      printf(&quot;forking failure\n&quot;);
    report_error(1);
    return PAM_CRED_ERR;
  }
  else if (PID &lt; 0) {
    if (debug == 1)
      printf(&quot;unexpected error\n&quot;);
    report_error(1);
    return PAM_CRED_ERR;
  }

  wait(&amp;amp;execreturn);
  //make sure this does exit properly and isn't killed
  if (WIFEXITED(execreturn)) {
    rc = WEXITSTATUS(execreturn);
  }
  else {
    report_error(1);
    return PAM_CRED_ERR;
  }
</pre>
<p>The first 18 lines emulate a system call. The rest is used to get the return value, which you would also need to do with a system call. Basically, it has close to the same functionality as if it were:</p>
<pre class="brush: cpp; title: ; notranslate">
  system(&quot;programcall&quot;);

  wait(&amp;amp;execreturn);
  //make sure this does exit properly and isn't killed
  if (WIFEXITED(execreturn)) {
    rc = WEXITSTATUS(execreturn);
  }
  else {
    report_error(1);
    return PAM_CRED_ERR;
  }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://webstersprodigy.net/2009/06/execv-like-system-call/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>browsing with firefox, tor, refcontrol, and noscript on ubuntu</title>
		<link>http://webstersprodigy.net/2009/05/browsing-with-firefox-tor-refcontrol-and-noscript-on-ubuntu/</link>
		<comments>http://webstersprodigy.net/2009/05/browsing-with-firefox-tor-refcontrol-and-noscript-on-ubuntu/#comments</comments>
		<pubDate>Fri, 08 May 2009 20:54:43 +0000</pubDate>
		<dc:creator>webstersprodigy</dc:creator>
				<category><![CDATA[GrayHat]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[tor]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://webstersprodigy.net/?p=534</guid>
		<description><![CDATA[I am doing some research that involves a *lot* of google searches. Because this research involves a significant number of directed queries, it seems logical to hide this information as much as practical. If there is a web host who notices sequential names in a Google referer URL repeatedly, this might raise suspicion or alter behavior which could skew results. Similarly, it is desirable to hide IP information from both the web host (for similar reasons) and possibly even search engines.]]></description>
			<content:encoded><![CDATA[<p>This is a topic that&#8217;s been covered a lot. However, it took a bit of research to find a solution that worked for me, so I thought I&#8217;d write about it here.</p>
<p>I am doing some research that involves a *lot* of google searches. Because this research involves a significant number of directed queries, it seems logical to hide this information as much as practical. If there is a web host who notices sequential names in a Google  referer URL repeatedly, this might raise suspicion or alter behavior which could skew results. Similarly, it is desirable to hide IP information from both the web host (for similar reasons) and possibly even search engines.</p>
<p>First, to  avoid any changes to usual browsing, a new firefox profile was created using:</p>
<blockquote><p>firefox -ProfileManager</p></blockquote>
<p>Additionally, to run both firefox profiles at once, the first was run as normal, which the second has the additional options:</p>
<blockquote><p>firefox -P &lt;new-profile&gt; -no-remote</p></blockquote>
<p>I add this to my taskbar alongside the regular old firefox %u so I can choose a profile with a click.</p>
<p>To hide the HTTP referer, a firefox extension called RefControl was selected  <a href="https://addons.mozilla.org/en-US/firefox/addon/953">https://addons.mozilla.org/en-US/firefox/addon/953</a>. This simply replaces the referer for every query with one that is configurable. Although this is certainly possible with a more traditional proxy (like paros), RefControl&#8217;s ease of use is essential with the shear number of queries that were performed for this research. For this research, I changed the referer passed several times from names like “yahoo.com”, “cnn.com”, etc. Although the traffic patterns may still seem suspicious to an administrator who carefully monitors his logs, it reveals virtually no information about what it is that is being searched for.</p>
<p>To obfuscate the IP address, tor and privoxy were used. Tor bounces the HTTP requests around a distributed network of relays all around the world. An in depth discussion of Tor is out of the context here, but in a nutshell “it prevents somebody watching your Internet connection from learning what sites you visit, and it prevents the sites you visit from learning your physical location” http://www.torproject.org/. Privoxy is additionally used to prevent applications like flash or dns from leaking information. Since both privoxy and tor are required, you need to install these:</p>
<blockquote><p>apt-get install tor privoxy</p></blockquote>
<p>and to get privoxy to work with tor, I uncommented the following line (if it&#8217;s not there just add it):</p>
<blockquote><p>forward-socks4a / localhost:9050 .</p></blockquote>
<p>Despite the advantages, this did make browsing for names quite slow. I really like torbutton. In the not so distant future I remember having to modify proxy settings every time I wanted to go back and forth using tor. With tor</p>
<p>Lastly, the noscript firefox plugin was used to mitigate all javascript based attacks that might be used to obtain IP information http://noscript.net/.</p>
]]></content:encoded>
			<wfw:commentRss>http://webstersprodigy.net/2009/05/browsing-with-firefox-tor-refcontrol-and-noscript-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Security in an Insecure Environment</title>
		<link>http://webstersprodigy.net/2009/04/security-in-an-insecure-environment/</link>
		<comments>http://webstersprodigy.net/2009/04/security-in-an-insecure-environment/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 03:30:48 +0000</pubDate>
		<dc:creator>webstersprodigy</dc:creator>
				<category><![CDATA[GrayHat]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[windoze]]></category>

		<guid isPermaLink="false">http://webstersprodigy.net/?p=520</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><iframe src='http://docs.google.com/EmbedSlideshow?docid=dhnfxq99_279djvf95fd' frameborder='0' width='410' height='342'></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://webstersprodigy.net/2009/04/security-in-an-insecure-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>stk500 avr atmega16 linux gcc hello, world</title>
		<link>http://webstersprodigy.net/2009/04/stk500-avr-atmega16-linux-gcc-hello-world/</link>
		<comments>http://webstersprodigy.net/2009/04/stk500-avr-atmega16-linux-gcc-hello-world/#comments</comments>
		<pubDate>Sat, 04 Apr 2009 06:12:48 +0000</pubDate>
		<dc:creator>webstersprodigy</dc:creator>
				<category><![CDATA[Bits and Bytes]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[avr]]></category>

		<guid isPermaLink="false">http://webstersprodigy.net/?p=467</guid>
		<description><![CDATA[Does my title sound like buz-word central? You bet it does. That's because it was a bit difficult to find any good introductory material on this. Maybe that's because there's so much information out there...]]></description>
			<content:encoded><![CDATA[<p>Does my title sound like buz-word central? You bet it does. That&#8217;s because it was a bit difficult to find any good introductory material on this. Maybe that&#8217;s because there&#8217;s so much information out there&#8230;</p>
<p>Anyway, here is some. The README:</p>
<blockquote><p>Rich Lundeen<br />
lundrich@isu.edu</p>
<p>The Specification:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>The purpose of this assignment is to introduce you to the software tools we will use for the<br />
AVR microprocessor, and to give you a better understanding of the run-time environment that<br />
a C program operates under.<br />
For this assignment, you will write a C main program and two subroutines &#8211; one in AVR<br />
assembly, and the other in C. The subroutines should each do the same thing:<br />
1. Monitor a port (your choice) that is connected to a switch. Wait until the switch is<br />
pressed.<br />
2. Once pressed, the routine should keep track of how long the switch is held down.<br />
3. Wait for approximately one second.<br />
4. Using another port (your choice) connected to a LED, turn on the LED for the same<br />
amount of time that the switch was pressed earlier.<br />
In addition to writing the code, determine the size of the code (main and both subroutines) in<br />
your program.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>This code requires avrdude, avr-gcc, and objcopy are installed.</p>
<p>To compile the C version, type:</p>
<p>make</p>
<p>To compile the asm version, type:</p>
<p>make asm</p>
<p>After it&#8217;s compiled, to install to a connected and powered on atmega16 board, type:</p>
<p>make install</p>
<p>homework1.avi contains a short demonstration of the C version &#8211; however, both do the same thing. It<br />
will play with vlc or mplayer.</p></blockquote>
<p>Here is a demo of the program.. oooh blinky lights. Yeah, and anyway, the hardest part is just to find a hello world. This includes one in both C and assembly, so good hunting!</p>
<p>
<object width="425" height="344" data="http://www.youtube.com/v/I654p4fcjww&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/I654p4fcjww&amp;hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /></object></p>
<p>Download the source<a href="http://webstersprodigy.net/uploads/blinky.tar.gz"> here</a>,</p>
<pre class="brush: cpp; title: ; notranslate">
/*main.c*/
#include &quot;portstuff.h&quot;

int main (void) {
  DDRB = 0xff;  /*11111111 means all output */
  DDRD = 0x00;  /*00000000 for all input */

  PORTB = 0xff;
  portmon();
  return(0);
}
</pre>
<pre class="brush: cpp; title: ; notranslate">
/*portstuff.h*/
#include &lt;inttypes.h&gt;
#include &lt;avr/pgmspace.h&gt;
#include &lt;avr/io.h&gt;

void portmon();
</pre>
<pre class="brush: cpp; title: ; notranslate">
/* portstuff.c */
#include &quot;portstuff.h&quot;

/*this is in clock cycles for my board.
* 30000 seems to be close to about a sec */
const DELAY = 30000;

void portmon() {
  while(1) {
    unsigned long timer = 0;
    unsigned long i;
    /*while a button is pressed */
    while (PIND != 0xff) {
      /*light up the button pressed */
      PORTB = PIND;
      timer += 1;
    }
    PORTB = 0xff;
    /*if the timer is not zero, we need to handle a button pressed */
    if (timer != 0) {
      /*delay for about a second */
      for (i = DELAY; i!=0; i--);
      PORTB = 0x00;
      /*delay for timer roughly equal to how long button was pressed */
      for (i = timer; i!=0; i--);
      timer = 0;
    }
  }
}
</pre>
<pre class="brush: cpp; title: ; notranslate">
#Makefile
#c specific - this is the default

homework1.hex: homework1.out
    objcopy -S -O ihex homework1.out homework1.hex
homework1.out: main.o portstuff.o
    avr-gcc -mmcu=atmega16 main.o portstuff.o -o homework1.out
main.o: portstuff.h main.c
    avr-gcc -c -mmcu=atmega16 main.c
portstuff.o: portstuff.h portstuff.c
    avr-gcc -c -mmcu=atmega16 portstuff.c

#assembly specific rules

asm: howework1asm.out
    objcopy -S -O ihex homework1.out homework1.hex
howework1asm.out: main.o portstuffasm.o
    avr-gcc -mmcu=atmega16 main.o portstuffasm.o -o homework1.out
portstuffasm.o: portstuff.h portstuff.s
    avr-gcc -c -mmcu=atmega16 portstuff.s -o portstuffasm.o

#clean and install

clean:
    rm ./*.o ./*.hex ./homework1.out

install:
    avrdude -y -C /etc/avrdude/avrdude.conf -p atmega16 -P /dev/ttyS0 -c stk500v2 -U flash:w:homework1.hex:i
</pre>
<pre class="brush: cpp; title: ; notranslate">
/*portstuff.s*/
#include &quot;portstuff.h&quot;

.file	&quot;portstuff.c&quot;
PORTB  = 56-0x20
PORTD  = 48-0x20
ALLON  = 31
WAIT   = 0xa
.text
.global	portmon
.type	portmon, @function
portmon:
/*initialize count to zero */
.BEGIN:
/*r18 is our counter*/
ldi     r18,0x00

/*initialize port values*/
in  r24,PORTD
out PORTB, r24

.LEDWAIT:
in  r24,PORTD
nop

/*see if the button is currently pressed - if it is then continue
if not jump to .LEDWAIT */
cpi r24, lo8(-1)
breq .LEDWAIT

.BUTTONPRESSED:

out PORTB, r24

/*measure the number of delays the button is pressed*/
rcall delay
inc r18

/*see if button is still currently pressed - if it is then
jump to Buttonpressed */

in   r24, PORTD
cpi  r24, lo8(-1)
brne .BUTTONPRESSED

out PORTB, r24
ldi r23, WAIT
.DELAYSECOND:
/*theoretically this delays a second */
rcall delay
dec r23
cpi r23,0
brne .DELAYSECOND

.LEDSON:
/*light up all leds for the amount of time the one was pressed*/
out PORTB, ALLON
rcall delay
dec r18
cpi r18,0
breq .BEGIN
rjmp .LEDSON

/*delay function makes time reasonable to deal with */
delay:
ldi r17,0x60
waitouterloop:
ldi r16,0xFF
waitinnerloop:
subi r16,0x01
brne waitinnerloop
subi r17,0x01
brne waitouterloop
ret

.size	portmon, .-portmon
</pre>
]]></content:encoded>
			<wfw:commentRss>http://webstersprodigy.net/2009/04/stk500-avr-atmega16-linux-gcc-hello-world/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

