milbit 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656
  1. #!/bin/bash
  2. ## Milis Sistem Bilgi Toplama
  3. ## milisarge <milisarge@gmail.com>
  4. ## brokenman <brokenman@porteus.org> xpsinfo betiğinden yararlanılmıştır.
  5. . /root/ayarlar/milbit/libmilisdialog
  6. [ ! -f /usr/share/applications/milbit.desktop ] && cp -rf /root/ayarlar/milbit/milbit.desktop /usr/share/applications/
  7. [ ! -f /usr/bin/gtkdialog ] && mps kur gtkdialog
  8. [ ! -f /usr/bin/dmidecode ] && mps kur dmidecode
  9. [ ! -f /usr/sbin/hdparm ] && mps kur hdparm
  10. ## Variables
  11. export tmpsi=/tmp/psinfo$$
  12. export info=$tmpsi/info.tmp
  13. ## Initial setup
  14. [ -d $tmpsi ] && rm -rf $tmpsi
  15. mkdir $tmpsi
  16. ## Opening page info
  17. cat > $info << EOF
  18. ---=== MİLİS SİSTEM BİLGİ TOPLAYICISI - MİLBİT ===---
  19. Kapsamlı milis işletim sistem bilgi toplayıcısı
  20. EOF
  21. ## Functions
  22. insert_header(){
  23. echo "$1" > $info
  24. echo "" >> $info
  25. }; export -f insert_header
  26. craction(){
  27. echo '<action signal="cursor_changed">get_info '$1'</action>
  28. <action signal="cursor_changed">refresh:'$2'</action>
  29. <action signal="cursor_changed">enable:btnOpen</action>
  30. <action signal="cursor_changed">enable:btnDump</action>'
  31. }; export -f craction
  32. gtk_upload_report(){
  33. export UP_REPORT='
  34. '`start_window "Dosyayı Yükle" info 500 250`'
  35. <hbox>
  36. '`pixmapfile 36 36 /usr/share/pixmaps/network.png`'
  37. '`txtcolor 440 darkred x-large normal " Kayıt dosyasını analiz için internete yapıştırın."`'
  38. </hbox>
  39. '`hsep`'
  40. <frame>
  41. '`txtmarkup 450 "Kayıt Dosyanızı analiz için yapıştırmak istermisiniz?"`'
  42. </frame>
  43. <hbox>
  44. '`butno`'
  45. '`butyes`'
  46. </hbox>
  47. '`end_window`'
  48. '
  49. gtkdialog -p UP_REPORT > $tmpsi/upload.tmp
  50. }; export -f gtk_upload_report
  51. get_info(){
  52. echo $1
  53. case $1 in
  54. Kernel )
  55. insert_header "KERNEL: `uname -r`"
  56. #echo "CURRENT KERNEL: `uname -r`" > $info
  57. #echo "" >> $info
  58. echo "YÜKLENEN KERNEL MODÜLLER:" >> $info
  59. lsmod|awk '{print$1}' >> $info
  60. ;;
  61. JAVA )
  62. insert_header "Java Güvenlik Bilgisi:"
  63. javaguvenlik=`ls ~/.java/deployment/security/exception.sites`
  64. if [ $javaguvenlik ]; then
  65. cat ~/.java/deployment/security/exception.sites >> $info
  66. else
  67. echo "Java güvenlik bilgisi dosyası bulunamadı." >> $info
  68. fi
  69. ;;
  70. Yüklü )
  71. insert_header "Java Yüklenmiş mi?:"
  72. yuklukont=`ls /var/lib/pkg/DB/jre/kurulan`
  73. if [ $yuklukont ]; then
  74. echo "Java yüklü." >> $info
  75. else
  76. echo "Yüklü java bulunamadı." >> $info
  77. fi
  78. ;;
  79. Sertifikalar )
  80. insert_header "Yüklü Sertifika Bilgileri:"
  81. ls /etc/ssl/certs/*.pem >> $info
  82. ;;
  83. Host )
  84. insert_header "Java Güvenlik Bilgisi:"
  85. hostd="/etc/hosts"
  86. if [ -f "$hostd" ]; then
  87. cat /etc/hosts >> $info
  88. else
  89. echo "Host dosyası bulunamadı." >> $info
  90. fi
  91. ;;
  92. Java_Policy )
  93. insert_header "Java.policy Bilgisi:"
  94. policy="`cat ~/.java.policy`"
  95. if [ "$policy" ]; then
  96. cat ~/.java.policy >> $info
  97. else
  98. echo "Java.policy dosyası bulunamadı." >> $info
  99. fi
  100. ;;
  101. İşlemci )
  102. egrep "vendor|name|cores|flags|MHz|address|cpuid" /proc/cpuinfo|sort -u > $info
  103. dmidecode -t 4|egrep "Family|ACPI|APIC|PGE|threading|Thermal|Speed|Clock|Thread|capable" >> $info
  104. sed -i 's/^[ \t]*//' $info
  105. ;;
  106. Bios )
  107. insert_header "BIOS BİLGİSİ:"
  108. dmidecode -t 0|sed -e '/dmidecode/d' -e '/SMBIOS/d' -e '/Handle/d' -e '/^$/d' >> $info
  109. ;;
  110. Anakart )
  111. insert_header "ANAKART:"
  112. dmidecode -t 1 | grep "Manufacturer\|Product Name\|Serial Number" | tr -d "\t" | sed "s/Manufacturer//" >> $info
  113. ;;
  114. Hafıza )
  115. dmidecode -t 16|egrep "Capacity|Devices|Correction|Use:"|sed 's/^[ \t]*//' > $info
  116. cat /proc/meminfo >> $info
  117. ;;
  118. Ekran )
  119. insert_header "EKRAN BİLGİSİ:"
  120. xrandr >> $info
  121. ;;
  122. Grafik )
  123. insert_header "EKRAN KARTI:"
  124. for I in `lspci |awk '/VGA/{print $1}'`;do lspci -v -s $I >> $info;done
  125. ;;
  126. Ses )
  127. insert_header "SES KARTLARI:"
  128. grep ":" /proc/asound/cards|awk -F: '{print$NF}' >> $info
  129. lspci|grep Audio|awk -F: '{print$NF}' >> $info
  130. echo "" >> $info
  131. aplay -l >> $info
  132. ;;
  133. Optik )
  134. insert_header "CD/DVD"
  135. pres=`ls -l /dev/cdrom|awk '{print$NF}'`
  136. if [ "$pres" ]; then
  137. cat /proc/sys/dev/cdrom/info|egrep "name:|speed:|slots:"|sed '/change/d' >> $info
  138. cdrecord -prcap dev=/dev/cdrom|egrep "Device type|Vendor_info|Identifikation|Revision" >> $info
  139. #cat $PSC_TMP/.cd >> $info
  140. echo "" >> $info
  141. echo "PROFILE: " >> $info
  142. cdrecord -prcap dev=/dev/cdrom|grep Profile >> $info
  143. #cat $PSC_TMP/.cd >> $info
  144. echo "" >> $info
  145. echo "CAPABILITIES:" >> $info
  146. cdrecord -prcap dev=/dev/cdrom|egrep "Does|Write|Feature"|sort -u >> $info
  147. else
  148. echo "/dev/cdrom altında optik sürücü bulunumadı!" > $info
  149. fi
  150. ;;
  151. Webcam )
  152. insert_header "WEBCAM BİLGİSİ:"
  153. if [[ `ls /dev/video0` ]]; then
  154. if [ -f /usr/bin/v4l2-ctl ]; then
  155. echo "" >> $info
  156. echo "-----" >> $info
  157. v4l2-ctl --list-devices >> $info
  158. echo "-----" >> $info
  159. v4l2-ctl --list-formats-ext >> $info
  160. fi
  161. #cat /sys/class/video4linux/video0/device/input/input*/name >> $info
  162. cat /sys/class/video4linux/video0/device/interface >> $info
  163. echo "product:" >> $info
  164. cat /sys/class/video4linux/video0/device/input/input*/id/product >> $info
  165. echo "vendor:" >> $info
  166. cat /sys/class/video4linux/video0/device/input/input*/id/vendor >> $info
  167. else
  168. echo "" >> $info
  169. echo "Webcam bulunamadı." >> $info
  170. fi
  171. ;;
  172. Sürücüler )
  173. insert_header "Sürücü Bilgisi:"
  174. for abc in `df|sed -e '/aufs/d' -e '/Used/d'|awk '{print$1}'|tr -d [:digit:]|sort -u`; do
  175. bcd=`echo $abc|sed 's@/dev/@@g'`
  176. if [ `cat /sys/block/$bcd/removable` -eq 0 ]; then
  177. hdparm -I $abc >> $info
  178. fi
  179. done
  180. ;;
  181. Usb_aygıtlar )
  182. insert_header "USB AYGITLARI:"
  183. lsusb -t >> $info
  184. ;;
  185. Usb )
  186. insert_header "USB BİLGİSİ:"
  187. base=`ls -l /sys/block/|awk '{print$9}'|grep .d.`
  188. for abc in $base; do
  189. if [ `cat /sys/block/$abc/removable` -eq 1 ]; then
  190. echo "$a is removable" >> $info
  191. [ ! `mount|grep $a` ] && mt=no || mt=yes
  192. echo "MOUNTED: $mt" >> $info
  193. echo "NAME: `cat /sys/block/$a/device/model`" >> $info
  194. echo "VENDOR: `cat /sys/block/$a/device/vendor`" >> $info
  195. echo "STATE: `cat /sys/block/$a/device/state`" >> $info
  196. echo "SIZE: `df -h /dev/$a|tail -n1|awk '{print$2}'`" >> $info
  197. fi
  198. done
  199. ;;
  200. Bölümler )
  201. insert_header "BÖLÜMLEME BİLGİSİ:"
  202. df -Th|sed '/aufs/d' >> $info
  203. echo "" >> $info
  204. echo "LABEL/UUID INFO:" >> $info
  205. for a in `df|sed -e '/Used/d' -e '/aufs/d'|awk '{print$1}'`; do
  206. blkid|grep $a
  207. done >> $info
  208. ;;
  209. Pil )
  210. insert_header "PİL BİLGİSİ:"
  211. #dmidecode -t 22|sed -e '/dmidecode/d' -e '/SMBIOS/d' -e '/Handle/d' -e '/^$/d' >> $info
  212. upower -i /org/freedesktop/UPower/devices/battery_BAT0 >> $info
  213. ;;
  214. Anagövde )
  215. insert_header "ANAGÖVDE BİLGİSİ:"
  216. dmidecode -t 3|sed -e '/dmidecode/d' -e '/SMBIOS/d' -e '/Handle/d' -e '/^$/d' >> $info
  217. ;;
  218. Sistem )
  219. insert_header "SİSTEM BİLGİSİ:"
  220. dmidecode -t 1|sed -e '/dmidecode/d' -e '/SMBIOS/d' -e '/Handle/d' -e '/^$/d' >> $info
  221. ;;
  222. Kablolu )
  223. insert_header "KABLOLU BAĞLANTI BİLGİSİ:"
  224. for I in `lspci |awk '/Ethernet/{print $1}'`;do lspci -v -s $I >> $info;done
  225. ;;
  226. Kablosuz )
  227. insert_header "KABLOSUZ BAĞLANTI BİLGİSİ:"
  228. for I in `lspci |awk '/Wireless/{print $1}'`;do lspci -v -s $I >> $info;done
  229. ;;
  230. Mac )
  231. insert_header "MAC ADRES BİLGİSİ:"
  232. for dev in wlan eth; do
  233. dev=`ifconfig|grep -A3 $dev[0-9]|head -n1|awk '{print$1}'`
  234. mac=`ifconfig $dev|grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}'`
  235. echo "$dev $mac" >> $info
  236. done
  237. ;;
  238. IP )
  239. insert_header "IP BİLGİSİ:"
  240. ifconfig >> $info
  241. ;;
  242. İsimsunucusu )
  243. insert_header "İSİM SUNUCU BİLGİSİ:"
  244. ns=`cat /etc/resolv.conf|sed '/#/d'`
  245. if [ "$ns" ]; then
  246. echo $ns >> $info
  247. else
  248. echo "İsim sunucu bulunamadı." >> $info
  249. fi
  250. ;;
  251. Yönlendirme )
  252. insert_header "YÖNLENDİRME (ROUTING) BİLGİSİ:"
  253. route -ne >> $info
  254. ;;
  255. Dmesg )
  256. insert_header "DMESG KAYIT ÇIKTISI:"
  257. dmesg >> $info
  258. ;;
  259. Mesajlar )
  260. insert_header "/var/log/* BİLGİSİ:"
  261. ls /var/log/*.log >> $info
  262. ;;
  263. Xorg )
  264. insert_header "XORG KAYIT ÇIKTISI:"
  265. xlog=`cat /var/log/Xorg.0.log`
  266. if [ "$xlog" ]; then
  267. cat /var/log/Xorg.0.log >> $info
  268. else
  269. echo "xorg logu bulunamadı." >> $info
  270. fi
  271. ;;
  272. Xsession )
  273. insert_header "XSESSION HATALARI:"
  274. [ -f /root/.xsession-errors ] && echo "Kullanıcı: root" >> $info && cat /root/.xsession-errors >> $info
  275. for a in `grep -v "\!" /etc/shadow|cut -d':' -f1|sed 'root/d'`; do
  276. [ -f /home/$a/.xsession-errors ] && echo "Kullanıcı: $a" >> $info && cat /home/$a/.xsession-errors >> $info
  277. done
  278. ;;
  279. Syslog )
  280. insert_header "SYSLOG:"
  281. vl=/var/log
  282. [ -f $vl/syslog ] && cat $vl/syslog >> $info || echo "syslog kaydı bulunamadı." >> $info
  283. ;;
  284. Sürüm )
  285. insert_header "Milis Sürüm Bilgisi:"
  286. cat /etc/lsb-release >> $info
  287. echo "Kernel: `uname -r`" >> $info
  288. ;;
  289. Paketler )
  290. insert_header "YÜKLÜ PAKETLER:"
  291. ls -1 /var/lib/pkg/DB/ >> $info
  292. ;;
  293. Servisler )
  294. insert_header "SERVİSLER:"
  295. ls /etc/init.d/ >> $info
  296. ;;
  297. lspci )
  298. insert_header "lspci çıktı:"
  299. lspci -knn >> $info
  300. ;;
  301. lsmod )
  302. insert_header "lsmod çıktı:"
  303. lsmod >> $info
  304. ;;
  305. Kullanıcılar )
  306. insert_header "Kullanıcılar Bilgisi:"
  307. grep -v "\!" /etc/shadow|cut -d':' -f1 >> $info
  308. ;;
  309. SonAçılma )
  310. insert_header "SON AÇILMA:"
  311. who -b|sed 's/^[ \t]*//' >> $info
  312. echo "Çalışma Süresi (hr:min) : `uptime|awk '{print$3}'|sed 's/,//g'`" >> $info
  313. esac
  314. }; export -f get_info
  315. export MILIS_BILGI='
  316. '`start_window "MilBiT" hwinfo 600 460`'
  317. <hbox>
  318. '`pixmapfile 36 36 /sources/milis.git/ayarlar/milislogo.png`'
  319. '`txtcolor 500 darkred x-large normal " MİLİS SİSTEM BİLGİ TOPLAYICISI - MİLBİT"`'
  320. </hbox>
  321. '`hsep`'
  322. <notebook show-tabs="true" show-border="false" labels="Cihaz|Medya|Sürücüler|Ağ|Log|Milis|E-İmza|Çeşitli" height-request="350">
  323. <vbox>
  324. <hbox>
  325. <tree selection-mode="3" exported-column="0" rules-hint="true" headers-clickable="false">
  326. <label>Elemanlar</label>
  327. <variable>Cihaz</variable>
  328. <width>130</width>
  329. <height>300</height>
  330. <item>Kernel</item>
  331. <item>Sistem</item>
  332. <item>İşlemci</item>
  333. <item>Anakart</item>
  334. <item>Pil</item>
  335. <item>Bios</item>
  336. <item>Hafıza</item>
  337. <item>Ekran</item>
  338. <item>Anagövde</item>
  339. '`craction '\$Cihaz' machinfo`'
  340. </tree>
  341. <edit editable="false" wrap-mode="0" left-margin="10">
  342. <variable>machinfo</variable>
  343. <width>450</width>
  344. <input file>'$tmpsi'/info.tmp</input>
  345. </edit>
  346. </hbox>
  347. </vbox>
  348. <vbox>
  349. <hbox>
  350. <tree selection-mode="3" exported-column="0" rules-hint="true" headers-clickable="false">
  351. <label>Elemanlar</label>
  352. <variable>grafikler</variable>
  353. <width>130</width>
  354. <height>300</height>
  355. <item>Ekran Kartı</item>
  356. <item>Ses Kartı</item>
  357. <item>Optik sürücü</item>
  358. <item>Webcam</item>
  359. <item>Usb_aygıtlar</item>
  360. '`craction '\$grafikler' machinfo2`'
  361. </tree>
  362. <edit editable="false" wrap-mode="0" left-margin="10">
  363. <variable>machinfo2</variable>
  364. <width>450</width>
  365. <input file>'$tmpsi'/info.tmp</input>
  366. </edit>
  367. </hbox>
  368. </vbox>
  369. <vbox>
  370. <hbox>
  371. <tree selection-mode="3" exported-column="0" rules-hint="true" headers-clickable="false">
  372. <label>Elemanlar</label>
  373. <variable>suruculer</variable>
  374. <width>130</width>
  375. <height>300</height>
  376. <item>Sürücüler</item>
  377. <item>Usb</item>
  378. <item>Bölümler</item>
  379. '`craction '\$suruculer' machinfo3`'
  380. </tree>
  381. <edit editable="false" wrap-mode="0" left-margin="10">
  382. <variable>machinfo3</variable>
  383. <width>450</width>
  384. <input file>'$tmpsi'/info.tmp</input>
  385. </edit>
  386. </hbox>
  387. </vbox>
  388. <vbox>
  389. <hbox>
  390. <tree selection-mode="3" exported-column="0" rules-hint="true" headers-clickable="false">
  391. <label>Elemanlar</label>
  392. <variable>ag</variable>
  393. <width>130</width>
  394. <height>300</height>
  395. <item>Kablolu</item>
  396. <item>Kablosuz</item>
  397. <item>Mac adresi</item>
  398. <item>IP adresi</item>
  399. <item>İsimsunucusu</item>
  400. <item>Yönlendirme</item>
  401. '`craction '\$ag' machinfo4`'
  402. </tree>
  403. <edit editable="false" wrap-mode="0" left-margin="10">
  404. <variable>machinfo4</variable>
  405. <width>450</width>
  406. <input file>'$tmpsi'/info.tmp</input>
  407. </edit>
  408. </hbox>
  409. </vbox>
  410. <vbox>
  411. <hbox>
  412. <tree selection-mode="3" exported-column="0" rules-hint="true" headers-clickable="false">
  413. <label>Elemanlar</label>
  414. <variable>logs</variable>
  415. <width>130</width>
  416. <height>300</height>
  417. <item>Dmesg</item>
  418. <item>Mesajlar</item>
  419. <item>Xorg</item>
  420. <item>Xsession</item>
  421. <item>Syslog</item>
  422. <item>SonAçılma</item>
  423. '`craction '\$logs' machinfo5`'
  424. </tree>
  425. <edit editable="false" wrap-mode="0" left-margin="10">
  426. <variable>machinfo5</variable>
  427. <width>450</width>
  428. <input file>'$tmpsi'/info.tmp</input>
  429. </edit>
  430. </hbox>
  431. </vbox>
  432. <vbox>
  433. <hbox>
  434. <tree selection-mode="3" exported-column="0" rules-hint="true" headers-clickable="false">
  435. <label>Elemanlar</label>
  436. <variable>milis</variable>
  437. <width>130</width>
  438. <height>300</height>
  439. <item>Kullanıcılar</item>
  440. <item>Sürüm</item>
  441. <item>Paketler</item>
  442. <item>Servisler</item>
  443. '`craction '\$milis' machinfo6`'
  444. </tree>
  445. <edit editable="false" wrap-mode="0" left-margin="10">
  446. <variable>machinfo6</variable>
  447. <width>450</width>
  448. <input file>'$tmpsi'/info.tmp</input>
  449. </edit>
  450. </hbox>
  451. </vbox>
  452. <vbox>
  453. <hbox>
  454. <tree selection-mode="3" exported-column="0" rules-hint="true" headers-clickable="false">
  455. <label>Elamanlar</label>
  456. <variable>imza</variable>
  457. <width>130</width>
  458. <height>300</height>
  459. <item>Sertifikalar</item>
  460. <item>Yüklü JAVA </item>
  461. <item>Kart Bilgisi</item>
  462. <item>MEB İnterneti</item>
  463. <item>JAVA Güvenlik</item>
  464. <item>Host Dosyası</item>
  465. <item>Java_Policy</item>
  466. '`craction '\$imza' machinfo7`'
  467. </tree>
  468. <edit editable="false" wrap-mode="0" left-margin="10">
  469. <variable>machinfo7</variable>
  470. <width>450</width>
  471. <input file>'$tmpsi'/info.tmp</input>
  472. </edit>
  473. </hbox>
  474. </vbox>
  475. <vbox>
  476. <hbox>
  477. <tree selection-mode="3" exported-column="0" rules-hint="true" headers-clickable="false">
  478. <label>Elemanlar</label>
  479. <variable>cesitli</variable>
  480. <width>130</width>
  481. <height>300</height>
  482. <item>lspci</item>
  483. <item>lsmod</item>
  484. '`craction '\$cesitli' machinfo8`'
  485. </tree>
  486. <edit editable="false" wrap-mode="0" left-margin="10">
  487. <variable>machinfo8</variable>
  488. <width>450</width>
  489. <input file>'$tmpsi'/info.tmp</input>
  490. </edit>
  491. </hbox>
  492. </vbox>
  493. </notebook>
  494. <hbox>
  495. '`butcustom "Ekrandaki bilgiyi metin düzenleyicide açar." "Bilgiyi Dosyada Aç" btnOpen stock gtk-file false`'
  496. <action>kwrite $info || leafpad $info || beaver $info || mousepad $info || geany $info || kate $info</action>
  497. </button>
  498. '`butcustom "Mevcut Bilgi ekranını dosyaya yazdırır /root/psinfo.txt" "Dosyaya Yazdır" btnDump stock gtk-revert-to-saved false`'</button>
  499. '`butcustom "Kapsamlı sistem raporunu dosyaya yazdırır ~/psinfo.txt" "Kapsamlı Rapor Yazdır" btnReport stock gtk-go-down true`'</button>
  500. '`butcancel`'
  501. </hbox>
  502. '`end_window`'
  503. '
  504. gtkdialog -p MILIS_BILGI > $tmpsi/dump
  505. [ `egrep -o "Cancel|abort" $tmpsi/dump` ] && { rm -rf $tmpsi; exit; }
  506. [[ `grep "Dosyaya Yazdır" $tmpsi/dump` ]] && gtk_upload_report
  507. if [[ `grep "Kapsamlı Rapor" $tmpsi/dump` ]]; then
  508. export STATE=MANUAL
  509. echo "kapsamlı rapor üretiliyor ..." > /tmp/.message
  510. manual_progress "İşleniyor"
  511. echo "MİLİS_SÜRÜM:" > $info
  512. cat /etc/Milis-sürüm >> $info
  513. echo "" >> $info
  514. echo "KERNEL/İŞLEMCİ:" >> $info
  515. echo `uname -r` `uname -m` `uname -p`>> $info
  516. echo "" >> $info
  517. echo "HAFIZA/SWAP:" >> $info
  518. free -m >> $info
  519. echo "" >> $info
  520. echo "BLOK AYGITLARI:" >> $info
  521. ls -1 /sys/block | grep -v loop | sed s/@// >> $info
  522. echo "" >> $info
  523. echo "BÖLÜMLER:" >> $info
  524. blkid | grep -v squashfs >> $info
  525. echo "" >> $info
  526. echo "BAĞLANMIŞ BÖLÜMLER:" >> $info
  527. df -Th | grep -v devtmpfs >> $info
  528. echo "" >> $info
  529. echo "CHEATCODES:" >> $info
  530. cat /proc/cmdline >> $info
  531. echo "" >> $info
  532. echo "LIVEDBG BİLGİ:" >> $info
  533. cat /var/log/Milis-livedbg >> $info
  534. echo "" >> $info
  535. echo "SES KARTLARI:" >> $info
  536. cat /proc/asound/cards >> $info
  537. echo "" >> $info
  538. echo "LSPCI ÇIKTI:" >> $info
  539. lspci -knn >> $info
  540. echo "" >> $info
  541. echo "LSUSB ÇIKTI:" >> $info
  542. lsusb -t >> $info
  543. echo "" >> $info
  544. echo "LSMOD ÇIKTI:" >> $info
  545. lsmod >> $info
  546. echo "" >> $info
  547. echo "PİL BİLGİSİ:" >> $info
  548. dmidecode -t 22|sed -e '/dmidecode/d' -e '/SMBIOS/d' -e '/Handle/d' -e '/^$/d' >> $info
  549. echo "" >> $info
  550. echo "ANAGÖVDE BİLGİ:" >> $info
  551. dmidecode -t 3|sed -e '/dmidecode/d' -e '/SMBIOS/d' -e '/Handle/d' -e '/^$/d' >> $info
  552. echo "" >> $info
  553. echo "SİSTEM BİLGİ:" >> $info
  554. dmidecode -t 1|sed -e '/dmidecode/d' -e '/SMBIOS/d' -e '/Handle/d' -e '/^$/d' >> $info
  555. echo "" >> $info
  556. echo "KULLANICI BİLGİ:" >> $info
  557. grep -v "\!" /etc/shadow|cut -d':' -f1 >> $info
  558. echo "" >> $info
  559. echo "SON AÇILMA:" >> $info
  560. who -b|sed 's/^[ \t]*//' >> $info
  561. echo "Uptime (hr:min) : `uptime|awk '{print$3}'|sed 's/,//g'`" >> $info
  562. echo "" >> $info
  563. echo "LOADED MODULES:" >> $info
  564. ls -1 /mnt/live/memory/images >> $info
  565. echo "" >> $info
  566. echo "LOADED PACKAGES:" >> $info
  567. ls -1 /var/log/packages >> $info
  568. echo "" >> $info
  569. echo "/var/log/messages:" >> $info
  570. tac /var/log/messages | sed -n '1,/kmsg started./p' | tac >> $info
  571. echo "" >> $info
  572. echo "EKRAN:" >> $info
  573. xrandr >> $info 2>/dev/null
  574. echo "" >> $info
  575. echo "OpenGL sürüm:" >> $info
  576. glxinfo | grep -i opengl >> $info
  577. echo "" >> $info
  578. echo "/var/log/Xorg.0.log:" >> $info
  579. cat /var/log/Xorg.0.log >> $info 2>/dev/null
  580. echo "" >> $info
  581. echo "XSESSION HATALARI:" >> $info
  582. [ -f /root/.xsession-HATALARI ] && echo "Kullanıcı: root" >> $info && tail -n300 /root/.xsession-HATALARI >> $info
  583. for a in `grep -v "\!" /etc/shadow|cut -d':' -f1|sed 'root/d'`; do
  584. [ -f /home/$a/.xsession-HATALARI ] && echo "Kullanıcı: $a" >> $info && tail -n300 /home/$a/.xsession-HATALARI >> $info
  585. done
  586. kill_manual_progress
  587. gtk_upload_report
  588. fi
  589. yapistirnet_message(){
  590. echo '
  591. <window window_position="1" title="Milis Yapıştırma Mesajı" icon-name="cdr" allow-shrink="false" width-request="'$2'">
  592. <vbox>
  593. <hbox>
  594. <frame>
  595. <pixmap icon_size="6">
  596. <input file stock="'$3'"></input>
  597. </pixmap>
  598. </frame>
  599. <frame>
  600. <text wrap="true" selectable="true" has-focus="false"><label>"'$1'"</label></text>
  601. </frame>
  602. </hbox>
  603. <hbox>
  604. <button use-stock="true" label="gtk-ok" can-focus="true" has-focus="true"></button>
  605. </hbox>
  606. </vbox>
  607. </window>
  608. ' | gtkdialog -s
  609. }; export -f yapistirnet_message
  610. ## If Kullanıcı chose to upload then do it, else dump to ~
  611. if [ `egrep -o "Yes|yes" $tmpsi/upload.tmp` ]; then
  612. has_internet
  613. if [ $answ -eq 0 ]; then
  614. export STATE=MANUAL
  615. echo "Lütfen bekleyiniz,yükleniyor" > /tmp/.message
  616. manual_progress "ix.io"
  617. cat $info | curl -F 'f:1=<-' ix.io > $tmpsi/link.tmp
  618. kill_manual_progress
  619. export lnk=`awk '{print$NF}' < $tmpsi/link.tmp`
  620. echo $lnk > /tmp/ixio-link.txt
  621. yapistirnet_message "Dosyanız $lnk adresinde ayrıca bu link /tmp/ixio-link.txt. dosyasında." 500 gtk-yes
  622. else
  623. cp $info ~/psinfo_report.txt
  624. gtk_message "İnternet bağlantınız yok!.Raporunuz ~/psinfo_report.txt dosyasına kayıt edildi." 450 gtk-dialog-error
  625. fi
  626. else
  627. cp $info ~/psinfo_report.txt
  628. gtk_message "Raporunuz ~/psinfo_report.txt dosyasına kayıt edildi." 500 gtk-yes
  629. fi
  630. rm -rf $tmpsi