2023年8月25日星期五

[Windows]License for windows95_WIndow95のライセンス解析

It is real that someone is still checking with old OS license key.

They are the heroes of internet.



  「Windows 11」ではデジタルライセンス認証も可能になったが、Windowsを使い始めるには、正規品であることを証明するために数桁のユニークな英数字「プロダクトキー」の入力が求められる。

 ある研究者は興味本位で「Windows 95」のプロダクトキーを解析したところ、ある法則によって生成されていたことが分かった。本質を理解すれば、誰でも簡単にプロダクトキーを生成できてしまうという。その法則とは?

 セキュリティ研究者のstacksmashing氏は、Windows OSのプロダクトキー認証を突破できる裏ワザを発見した。同氏はさまざまなデバイスやアプリ、ゲーム機などをハッキングしてはその模様をYouTubeに投稿している。Windowsのプロダクトキーに関する話も動画で取り上げられた話題の一つだ。

 ただし、この裏ワザが通用するのは「Windows 95」のインストール時のみだ。Windows 95は1995年8月25日に英語版が、同年11月23日に日本語版が発売され、今のWindowsの礎を築いたOSと言っても過言ではない。

 stacksmashing氏が解明したプロダクトキーの生成アルゴリズムについて、詳しく解説しよう。

 Windows 95のプロダクトキーは「XXX-YYYYYYY」というように「-(ハイフン)」で接続された10桁(前半3桁と後半7桁)の数字で構成される。同氏は試行錯誤しながらそのプロダクトキーを入力する中で、ある傾向をつかんだ。

 まず、「111-1111111」と全て「1」にするとインストールは成功する。また、全て「0」の場合でも成功する。そして前半3桁を「000」「001」「567」と変更し、後半7桁が全て「1」の場合も有効なキーと認識される。ただし「333」「444」「555」といった「0」や「1」「2」以外の3連続の数字を入力した場合は失敗するようだ。

 後半7桁は「0000001」だと失敗し、そこから1ずつ数を増やしていったところ「0000007」の場合は成功することが分かった。それを繰り返していくと、後半の数字は「0000000」「0000007」「0000016」「0000025」だと成功することが判明した。同氏は、後半7桁の各数字の合計が「7の倍数」であれば成功するのでは、と推測した。確かに「1111111」も全て合算すれば「7」だ。

 stacksmashing氏はリバースエンジニアリングツール「Ghidra」を使って禁断のプログラム解析を敢行した。すると前半3桁は「333」「444」「555」「666」「777」「888」「999」の数字がブラックリスト入りしているだけで、その他の3桁の数字なら何でもいいことが判明した。そして後半7桁については、同氏の予測通り、全ての桁の数字を合計して7で割り切れれば成功することが分かった。しかも、3桁と7桁の間の文字はチェックされておらず、必ずしも「-(ハイフン)」である必要がない。

 これらの情報をまとめると「前半3桁は3~9の3並び以外なら何でもいい」「前半と後半をつなぐ文字はどれでもいい」「後半7桁は合計したとき『7』で割り切れればいい」と単純なものだったのだ。

 ちなみに、このアルゴリズムはWindows 95リテール版で通用するものであり、OEM版はまた異なる。OEM版の場合、プロダクトキーは「AAABB-OEM-XXXXXXX-YYYYY」という形式(「A」「B」「X」「Y」はそれぞれ整数、「OEM」は固定の文字列)で構成されているが、これも単純なアルゴリズムだ。

 stacksmashing氏の解析をまとめると「AAA」は「1~366」で、「BB」は「00~02」または「95~99」、「XXXXXXX」は先頭が「0」で、かつ合算して7で割り切れる7桁の数字、そして「YYYYY」はノーチェック、つまり「何でもいい5桁の数字」だ。何とも単純な仕様だ。

2023年2月14日星期二

[RaspBerry Pi]How to expand the root partition of your Raspberry PI’s SD card

 How to expand the root partition of your Raspberry PI’s SD card?

After installing a new OS on your PI’s SD card you might notice there is a lot of diskspace ‘missing’ on the card…

By expanding the root partition of the card you can regain that ‘missing’ space!

This is the easiest way to do it:

  • open the PI’s configuration screen (in the terminal window) by typing:
    sudo raspi-config
  • run the bottom option just to make sure you have the latest version of the configuration software:
    update
  • run the second option:
    expand_rootfs
  • click:
    Finish
  • select ‘YES‘ when it asks for a reboot

2023年1月30日星期一

[PERL]Confirm installed module on linux server

 ■以下のコマンドを実行すること確認できる

find `perl -e 'print "@INC"'` -name '*.pm' -print

 

■grep で限定表示

 find `perl -e ' print "@INC"' `-name '*.pm' -print | grep LWP


●@INC

Perlの特殊変数

●LWP

Perlモジュール 

2022年9月22日星期四

[Raspberry Pi]Install mail server on local raspberry pi with own domain

Yes, We will run the command [sudo apt-get install postfix].

To ensure you will get the newest version, you have to run below first.

sudo apt-get update

sudo apt-get upgrade

Then you can go with [sudo apt-get install postfix]

You will see some log like below.

Reading package lists... Done

Building dependency tree       

Reading state information... Done

The following packages were automatically installed and are no longer required:

  libgnutls-dane0 libunbound8

Use 'sudo apt autoremove' to remove them.

Suggested packages:

  procmail postfix-mysql postfix-pgsql postfix-ldap postfix-pcre postfix-lmdb postfix-sqlite sasl2-bin | dovecot-common libsasl2-modules

  | dovecot-common postfix-cdb ufw postfix-doc

The following packages will be REMOVED:

  exim4-base exim4-config exim4-daemon-light

The following NEW packages will be installed:

  postfix

0 upgraded, 1 newly installed, 3 to remove and 0 not upgraded.

Need to get 1,412 kB of archives.

After this operation, 62.5 kB disk space will be freed.

Do you want to continue? [Y/n] y

Get:1 http://ftp.udx.icscoe.jp/Linux/raspbian/raspbian buster/main armhf postfix armhf 3.4.23-0+deb10u1 [1,412 kB]

Fetched 1,412 kB in 2s (774 kB/s)    

Preconfiguring packages ...

(Reading database ... 221744 files and directories currently installed.)

Removing exim4-daemon-light (4.92-8+deb10u7) ...

Removing exim4-base (4.92-8+deb10u7) ...

Removing exim4-config (4.92-8+deb10u7) ...

Selecting previously unselected package postfix.

(Reading database ... 221611 files and directories currently installed.)

Preparing to unpack .../postfix_3.4.23-0+deb10u1_armhf.deb ...

Unpacking postfix (3.4.23-0+deb10u1) ...

Setting up postfix (3.4.23-0+deb10u1) ...

Adding group `postfix' (GID 126) ...

Done.

Adding system user `postfix' (UID 118) ...

Adding new user `postfix' (UID 118) with group `postfix' ...

Not creating home directory `/var/spool/postfix'.

Creating /etc/postfix/dynamicmaps.cf

Adding group `postdrop' (GID 127) ...

Done.

setting myhostname: raspberrypi

setting alias maps

setting alias database

changing /etc/mailname to achillia-mfg.com

setting myorigin

setting destinations: achillia-mfg.com, $myhostname, raspberrypi, localhost.localdomain, localhost

setting relayhost: smtp.localhost

setting mynetworks: 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128

setting mailbox_size_limit: 0

setting recipient_delimiter: +

setting inet_interfaces: all

setting inet_protocols: all

WARNING: /etc/aliases exists, but does not have a root alias.


Postfix (main.cf) is now set up with a default configuration.  If you need to 

make changes, edit /etc/postfix/main.cf (and others) as needed.  To view 

Postfix configuration values, see postconf(1).


After modifying main.cf, be sure to run 'service postfix reload'.


Running newaliases

Created symlink /etc/systemd/system/multi-user.target.wants/postfix.service → /lib/systemd/system/postfix.service.

Processing triggers for systemd (241-7~deb10u8+rpi1) ...

Processing triggers for man-db (2.8.5-2) ...

Processing triggers for rsyslog (8.1901.0-1+deb10u2) ...


2022年9月5日星期一

Raspberry pi上使用nslookup和dig

在Raspberry Pi上,初期状态是无法使用nslookup和dig等一些DNS相关命令的。

需要安装dnsutils package.

                    $ sudo apt-get update

$ sudo apt-get install dnsutils

安装后就可以使用下列命令了。 

$ nslookup example.com

$ dig example.com

2014年7月21日星期一

【WINDOWS8 & OFFICE2013】win8和office2013同时还原激活

1.备份
当一台电脑同时安装已激活的win8和office 2013时,我们就有必要备份一下已经激活状态,不然重装系统后将很费心思地找激活密钥。windows8与office 2013同时俱在时,
(1) 我们只需将系统盘(通常为C)C:\Windows\System32\spp\store的store文件夹备份到网盘上(注意store中含有隐藏的文件要全部备份)
(2)记住重装win8系统的用户名和激活密钥(无论是电话激活还是联网激活的密钥)
(3)记住office2013的安装路径(如D:\Programs\office)和激活密钥(无论是电话激活还是联网激活密钥)
2.还原激活信息
(1)安装win8的系统时注意版本和用户名要与备份的一样,然后将已备份的密钥用slmgr /ipk **** **** **** ****安装到电脑中
(2)安装office2013并注意版本和安装路径要与备份的一样,安装已备份密钥
(3)将备份的store完覆盖到C:\Windows\System32\spp\下store,重启
将显示win8与office2013同时激活
说明1:这个方法也可以用来备份单独的win8激活信息或者office 2013的激活信息

说明2:原来的有一种对win8备份还原的方是将电话激活的ID和用到的密钥备份,然后用命令激活的办法好像不怎么好用了,最好用本经验方法简单可行稳定长久。

2014年6月21日星期六

扒网络视频网站

目前大多数的视频网站,例如Youtube,都是使用Flash嵌套flv文件的方式播放视频。基于商业上考虑,一般只允许用户在线观看而不提供下载服务。如果你确实有需要把视频保存到电脑,或者将视频转换成其适合mp3、mp4、PSP、iPod、iPhone或其他手机的格式,那你就找对地方了。这里将为大家介绍10个最好的在线视频转换服务,全部都是免费甚至是无需注册的,一定能满足你视频下载或转换的需要。

1. Zamzar



网址:http://zamzar.com/url/

Zamzar支持音乐、视频、图片、文档类型的格式转换,支持格式多样,并且转换质量很高。免费用户允许转换100MB以内的文件。如果你自认是转换狂人,可以申请成为高级用户,获得更大的容量(1G)和更快的转换速度。界面简洁友好,容易上手。

2. Mux



网址:http://beta.mux.am

Mux还是一个测试中的服务,能将大部分的视频网站(当然是国外的)的节目保存到电脑上。

3. Vixy



网址:http://vixy.net

这个网站可以把flv文件转换成avi、mov、mp4、pm3、3gp等格式。网站声称比其他的转换工具更快和失真更少。这个服务是基于一个名为FLV to MPEG4 Conveter的开源引擎,如果有需要,你甚至可以下载其源代码。

4. VideoCodeZone



网址:http://www.videocodezone.com/conversion.php

这个网站可以将Youtube, MySpace, Google Videos, IFilm, Break, Dailymotion 及 Metacafe等网站的视频转换成一般的视频格式并下载到电脑里。输入需要转换的视频网址,选择输出的格式,点击Convert或Download,就可以转换或下载了。也可以选择电脑里flv文件进行转换。

5. MediaConverter



网址:http://www.mediaconverter.org

支持视频、音乐、铃声、图片及文档等多种媒体文件的转换和拆分。支持的格式不仅有mp3、wmv、3gp、flv、swf、mov、avi、mpg、mp4、divx、ipod、PSP等,还包括jpg、psd、doc、pdf、ttf、txt、odg,甚至是几乎绝迹的WordPerfect文件。网站有自动文件格式识别功能,如果自动识别失败,只需要手工选择源文件格式和目标格式,提交后就可以开始转换。除了转换本地文件外,也支持远程文件转换,只需要输入文件的网上地址即可,非常方便。

6. ConvertDirect



网址:http://www.convertdirect.com

可以在线转换类似Youtube这些网站的flv视频文件。支持输出的格式包括avi、3gp、mp3、mp4、wmv、mpeg、mov及psp。这样你就可以在你的电脑、ipd、Zune、PSP和各式各样的手机上欣赏视频了。

7. MovAVI



网址:http://online.movavi.com

MovAvi不仅免费,还不会有广告骚扰。你可以上传五个,总计不超过100MB的文件。当文件转换好后,会以电子邮件的形式通知你。而这个网站的特色,是可以把几个小视频文件合并成一个大的视频文件。

8. Flvix



网址:http://www.flvix.com

一个专注于Youtube 和Google Video的在线flv转换网站。界面虽然简陋但很实用,支持的格式包括avi、mp4、3gp和mp3。这样你就可以把视频下载到电脑、手机、ipod或PSP了。

9. All2Convert



网址:http://www.all2convert.com

将视频链接粘贴到URL Video box框,选择转换目标格式,然后点“Convert”开始转换。当转换成功的时候,就会出现下载链接。支持的设备包括手机、iphone、Zune、iPod、PSP和一般电脑,支持的格式包括有dvd、mov、mp4、vob、rm及wmv。

10. ConvertTube



网址:http://converttube.com

专门转换Youtube的flv文件的网站。支持的格式包括wmv、mov、mp4、mp3及3gp。和前面介绍的Vixy一样,这个网站也声称他的转换服务比其他转换工具更快,细节损失更少。(完)