Permalink
Browse files

* More info on bugreport and configuration database in readme file..

* Added possibility to see enable/disable scripts in web interface to configuration..
  • Loading branch information...
1 parent 3f7d208 commit 2253d2b9f68ad09f92eaecb76476f17667a079d1 @MrMEEE committed Aug 30, 2011
Showing with 34 additions and 10 deletions.
  1. +10 −2 README
  2. +1 −1 files/ironhide-bugreport
  3. +5 −5 files/ironhide-configuration
  4. +2 −2 web/index.php
  5. +16 −0 web/showinfo.php
View
@@ -13,7 +13,7 @@ This version features:
* Major cleanup, removed all content not related to Ubuntu.
* Updated VirtualGL.
-For now there is only natty packages available.
+For now there is maverick, natty and oneiric packages available.
https://launchpad.net/~mj-casalogic/+archive/ironhide/
@@ -29,4 +29,12 @@ When new versions come out, just rerun the configuration.
Report problems/issues here:
-https://github.com/MrMEEE/ironhide/issues
+https://github.com/MrMEEE/ironhide/issues
+
+BugWeb (Bugreport):
+
+http://www.martin-juhl.dk/bugweb/
+
+Configurations:
+
+http://www.martin-juhl.dk/ironhide/
@@ -116,7 +116,7 @@ done
nvidia_log=`cat /var/log/Xorg.$VGL_DISPLAY.log > /tmp/hex && xxd -p /tmp/hex | sed -e ':a;N;$!ba;s/\n//g'`
xorg_conf=`cat /etc/X11/xorg.conf > /tmp/hex && xxd -p /tmp/hex | sed -e ':a;N;$!ba;s/\n//g'`
xorg_conf_nvidia=`cat /etc/X11/xorg.conf.nvidia > /tmp/hex && xxd -p /tmp/hex | sed -e ':a;N;$!ba;s/\n//g'`
-lspci=`$LSPCI > /tmp/hex && xxd -p /tmp/hex | sed -e ':a;N;$!ba;s/\n//g'`
+lspci=`$LSPCI -v > /tmp/hex && xxd -p /tmp/hex | sed -e ':a;N;$!ba;s/\n//g'`
libraries=`echo "\`ls -la /usr/lib32/nvidia-current\` \`ls -la /usr/lib/xorg/\` \`ls -la /usr/lib/nvidia-current\`" > /tmp/hex && xxd -p /tmp/hex | sed -e ':a;N;$!ba;s/\n//g'`
modules=`$LSMOD > /tmp/hex && xxd -p /tmp/hex | sed -e ':a;N;$!ba;s/\n//g'`
alternatives=`echo "\`ls -la /etc/alternatives/\`" > /tmp/hex && xxd -p /tmp/hex | sed -e ':a;N;$!ba;s/\n//g'`
@@ -341,7 +341,7 @@ else
${x} "The BusID of the nVidia card can't be determined.\n"\
"You must correct this manually in /etc/X11/xorg.conf.nvidia\n"\
"Please report this problem..\n"
- exit 1
+ exit 0
fi
sudo sed -i "s/\([ \t]*BusID[ \t]*\)\".*\"/\1\"$NVIDIABUSID\"/g" /etc/X11/xorg.conf.nvidia
@@ -507,7 +507,7 @@ if [[ $ERRORS == 0 ]]; then
answer="${?}"
if [ ${answer} -eq 1 ]; then
- exit 1
+ exit 0
fi
else
@@ -517,7 +517,7 @@ if [[ $ERRORS == 0 ]]; then
answer="${?}"
if [ ${answer} -eq 1 ]; then
- exit 1
+ exit 0
fi
fi
else
@@ -580,7 +580,7 @@ if [[ $ERRORS == 0 ]];then
answer="${?}"
if [ ${answer} -eq 1 ]; then
- exit 1
+ exit 0
fi
@@ -595,7 +595,7 @@ if [[ $ERRORS == 0 ]];then
cp $EXAMPLEFOLDER/ironhide-enablecard.template /usr/local/bin/ironhide-enablecard
cp $EXAMPLEFOLDER/ironhide-disablecard.template /usr/local/bin/ironhide-disablecard
#"We have replaced the"
- exit 1
+ exit 0
fi
fi
fi
View
@@ -104,14 +104,14 @@
echo htmlspecialchars($row['Model']);
echo "</td>";
if ($row['nVidia Startup'] != "UNAVAILABLE"){
- echo "<td>Available</td>";
+ echo '<td><a href="showinfo.php?show=1&id='. htmlspecialchars($row['id']) . '&info=nVidia Startup">Available</a></td>';
}
else
{
echo "<td>Unavailable</td>";
}
if ($row['nVidia Shutdown'] != "UNAVAILABLE"){
- echo "<td>Available</td>";
+ echo '<td><a href="showinfo.php?show=1&id='. htmlspecialchars($row['id']) . '&info=nVidia Shutdown">Available</a></td>';
}
else
{
View
@@ -0,0 +1,16 @@
+<?php
+require "connect.php";
+
+if(isset($_GET["show"])){ // addmachine should not be combined with search
+// do not render the output as HTML
+header('Content-Type: text/plain');
+$id = filter_input(INPUT_GET, 'id');
@Lekensteyn
Lekensteyn Sep 8, 2011

SQL injection vulnerability: either cast it to a number (e.g. (int)), validate the data (ctype_digit), use sprintf('%d', $id) or switch to prepared statements.

+$info = filter_input(INPUT_GET, 'info');
+$query = mysql_query("SELECT `$info` FROM `confirmed` WHERE id = $id");
+$row = mysql_fetch_assoc($query);
+$getinfo = htmlspecialchars($row[$info]);
@Lekensteyn
Lekensteyn Sep 8, 2011

htmlspecialchars with a Content-Type of text/plain? You might want to check whether the field exists or not.

+
+$bin_str = pack("H*" , $getinfo);
+print($bin_str);
+}
+?>

0 comments on commit 2253d2b

Please sign in to comment.