- print "support2",len(List_bit_to_change2)
- print "message2",len(Message)
- print "weight2",len(Weight)
-
- alpha = float(len(List_bit_to_change2))/len(Message)
- print alpha
- assert alpha >= 2
- index = min(int(alpha),9)
- H_hat2 = {
- 2 : [71,109],
- 3 : [95, 101, 121],
- 4 : [81, 95, 107, 121],
- 5 : [75, 95, 97, 105, 117],
- 6 : [73, 83, 95, 103, 109, 123],
- 7 : [69, 77, 93, 107, 111, 115, 121],
- 8 : [69, 79, 81, 89, 93, 99, 107, 119],
- 9 : [69, 79, 81, 89, 93, 99, 107, 119, 125]
- }[index]
-
-
- print H_hat,H_hat2
-
-
- Stc_message2=[getBit(level2[l],bit_to_read) for l in List_bit_to_change]
- LL1=list(List_bit_to_change);
- LL2=list(List_bit_to_change2)
-
- print "Level",max([level2[l]-level[l] for l in xrange(len(Stc_message))])
- print "List bit to change",max([LL2[l]-LL1[l] for l in xrange(len(Stc_message))])
- print "Stc message", max([Stc_message[l]-Stc_message2[l] for l in xrange(len(Stc_message))])
-
- Message2 = [x%2 for x in prod(H_hat2,len(Message),Stc_message2)]
- level2=Message2
-
-# print "mesg",Message
-# print "mesg2",Message2
-
- print equiv(Message,Message2)
-
- print "fini"
-
- l=0
- val_mod2=0
- list_msg=[]
- decoded_msg=""
-
- MessageDecoded2=[(int(Message2[l])^int(List_random[l])) for l in xrange(len(Message2))]
-# print conv_list_bit(''.join([`MessageDecoded2[i]` for i in xrange(leng_error*8)]))
-# print int(conv_list_bit(''.join([`MessageDecoded2[i]` for i in xrange(leng_error*8)])))
-
- print conv_list_bit(''.join([`MessageDecoded2[i]` for i in xrange(len(Message2))]))
-
-
-
-
-
-
-# for l in List_bit_to_change2:
-# if(val_mod2<leng_error*8):
-# list_msg.append(`getBit(level2[l],bit_to_read)^int(List_random[val_mod2])`)
-# if(val_mod2==leng_error*8-1):
-# bin_leng2=''.join(list_msg)
-# coded_msg2=conv_list_bit(bin_leng2)
-# clear_msg2=coded_msg2
-# length_msg=int(clear_msg2)
-# list_msg=[]
-# if(val_mod2>=leng_error*8 and val_mod2<leng_error*8+length_msg*leng_error):
-# list_msg.append(`getBit(level2[l],bit_to_read)^int(List_random[val_mod2])`)
-# if(len(list_msg)==leng_error*8):
-# pack=''.join(list_msg)
-# msg=conv_list_bit(pack)
-# decoded_msg=decoded_msg+msg
-# list_msg=[]
-# val_mod2+=1
-# l=l+1
-
- print decoded_msg#[0:20]
- print len(List_bit_to_change)
- list_nb_bit.append(filein)
- list_nb_bit.append(len(List_bit_to_change))
-
-
-
-
-#path_cover = '/localhome/couturie/ensemble/cover_bad_laplace/'
-path_stego = '/localhome/couturie/ensemble/BossBase-1.0-canny_new/'
-path_cover = '/localhome/couturie/ensemble/BossBase-1.0-cover/'
-#path_stego = '/tmp/'
-#path_stego = '/home/couturie/BossBase-1.0-canny/'
-#listing = os.listdir(path_cover)
-
-list_nb_bit=[]
-l=0
-
-
-mystego(argv[1],argv[2])