uniqwords 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678
  1. #!/bin/bash
  2. #caveat: searching for a specific expression is still viable!
  3. #show me all the words excluding those in the list(ie. remove trivial non-identifying words), note: case-sensitive:
  4. excludewords=(
  5. router
  6. bin
  7. bash
  8. iptables
  9. PRE_UTILIZE
  10. nat
  11. dev
  12. null
  13. br0
  14. 192.168.1.1
  15. DNAT
  16. dport
  17. udp
  18. tcp
  19. 53
  20. iprange
  21. FWD_UTILIZE
  22. flags
  23. SYN
  24. RST
  25. TCPMSS
  26. clamp-mss-to-pmtu
  27. POSTROUTING
  28. MASQUERADE
  29. dst-range
  30. DROP
  31. to
  32. rp_filter
  33. ESTABLISHED
  34. RELATED
  35. ACCEPT
  36. state
  37. INPUT
  38. FWD_IN
  39. proc
  40. sys
  41. net
  42. ipv4
  43. conf
  44. 8.8.8.8
  45. 8.8.4.4
  46. 255.255.255.0
  47. 192.168.1.0
  48. limit
  49. ALL
  50. LOG
  51. log
  52. log-level
  53. log-prefix
  54. teh
  55. is
  56. this
  57. open
  58. "it's"
  59. service
  60. tproxy
  61. either
  62. way
  63. cannot
  64. block
  65. it
  66. though
  67. web
  68. interface
  69. security
  70. can
  71. OK
  72. workaround
  73. and
  74. close
  75. via
  76. NAT
  77. Virtual
  78. Servers
  79. also
  80. just
  81. run
  82. twice
  83. from
  84. local
  85. localhost
  86. LAN
  87. "for"
  88. good
  89. curl
  90. non-used
  91. redirect
  92. IP
  93. server
  94. Empty
  95. reply
  96. again
  97. Failed
  98. connect
  99. port
  100. Connection
  101. refused
  102. you
  103. "if"
  104. "do"
  105. firefox
  106. "won't"
  107. keeps
  108. asking
  109. user
  110. pass
  111. PRE_LOCAL
  112. report
  113. as
  114. closed
  115. scan
  116. ip
  117. rule
  118. add
  119. default
  120. table
  121. flush
  122. route
  123. mangle
  124. OUTPUT
  125. MARK
  126. set-mark
  127. IGMP
  128. src
  129. sport
  130. snmp
  131. through
  132. reject
  133. with
  134. reset
  135. instead
  136. of
  137. drop
  138. maybe
  139. consider
  140. REJECT
  141. icmp
  142. Port
  143. Unreachable
  144. ICMPs
  145. deprecated
  146. ICMP
  147. Some
  148. types
  149. are
  150. so
  151. they
  152. should
  153. probably
  154. be
  155. blocked
  156. unconditionally
  157. Among these source quench
  158. type code
  159. alternate host
  160. Types
  161. above all
  162. reserved future use
  163. or experimental
  164. messages
  165. advertisement
  166. solicitation
  167. packets
  168. requires
  169. apparently
  170. timestamp request
  171. allow incoming
  172. the following
  173. Type
  174. Echo replies
  175. These responses echo requests
  176. pings
  177. Destination Legitimate destination unreachable created by your indicating
  178. that packet could not delivered
  179. Time exceeded
  180. This diagnostic error returned generated died before
  181. reaching
  182. because exceeding its TTL value
  183. Parameter problem
  184. means an outgoing was malformed
  185. Timestamp queries
  186. connection limiting
  187. second
  188. connlimit
  189. other
  190. policy
  191. aka
  192. last
  193. servers
  194. secure
  195. policy
  196. already
  197. even
  198. rules
  199. TODO
  200. DROPs
  201. put
  202. hashlimit
  203. recent
  204. check
  205. logs
  206. lists
  207. firewalls
  208. added
  209. telnet
  210. limited
  211. need
  212. sudo
  213. conntrack
  214. more
  215. see
  216. Ars
  217. firewall
  218. etc
  219. simple_firewall
  220. ufw
  221. when
  222. done
  223. uninstall
  224. gufw
  225. nft
  226. nftables
  227. might
  228. want
  229. back
  230. Documents
  231. htmls
  232. ctstate
  233. using
  234. due
  235. bugged
  236. likeliness
  237. bugs
  238. find
  239. will
  240. fixed
  241. enough
  242. "don't"
  243. wanna
  244. bother
  245. stable
  246. multiport
  247. example
  248. allowing
  249. INCOMING # http https
  250. dports
  251. NEW
  252. xtables-multi
  253. save
  254. restore
  255. symlink
  256. file
  257. ubuntu
  258. Attempting
  259. ok actually ssh
  260. established on
  261. reach UDP result in
  262. message
  263. We imitate typing
  264. establish TCP results response
  265. For we send protocol indicate
  266. "doesn't"
  267. respond
  268. proto
  269. note
  270. rate
  271. per
  272. sysctl
  273. milliseconds
  274. only first evaluated against
  275. Any decisions made first applied subsequent without additional evaluation
  276. connections
  277. automatically have reverse applied correctly
  278. Responses
  279. chain traveral order
  280. Incoming destined system
  281. PREROUTING
  282. FORWARD
  283. another
  284. Locally
  285. netfilter
  286. architecture
  287. hangs
  288. freezes
  289. time
  290. hung
  291. minutes
  292. I
  293. i
  294. turned off
  295. prev
  296. time
  297. recovered
  298. used
  299. cpu
  300. core
  301. virtualbox
  302. But
  303. releases
  304. command
  305. commands
  306. INFO
  307. which
  308. usr
  309. var
  310. tmp
  311. portage
  312. root
  313. backup
  314. lib64
  315. modules
  316. chromium
  317. thumbnails
  318. sbin
  319. cache
  320. ccache
  321. ebuild
  322. config
  323. linux
  324. hardened
  325. but
  326. home
  327. what
  328. executed
  329. rsync
  330. super
  331. verbose
  332. compress
  333. partial
  334. progress
  335. recursive
  336. links
  337. perms
  338. times
  339. group
  340. owner
  341. no
  342. devices
  343. specials
  344. hard
  345. acls
  346. xattrs
  347. checksum
  348. delay
  349. updates
  350. ignore
  351. errors
  352. force
  353. numeric
  354. ids
  355. update
  356. one
  357. sparse
  358. prune
  359. empty
  360. dirs
  361. timeout
  362. info
  363. SYMSAFE
  364. DEL
  365. NAME
  366. SKIP
  367. STATS
  368. munge
  369. preallocate
  370. protect
  371. args
  372. files
  373. exclude
  374. delete
  375. excluded
  376. dir
  377. backed
  378. gentoo
  379. rsh
  380. after
  381. 1st
  382. dns
  383. "test"
  384. then
  385. fi
  386. "exit"
  387. set
  388. scp
  389. arg
  390. unset
  391. shopt
  392. invalid
  393. elif
  394. amd
  395. intel
  396. dest
  397. hosts
  398. remote
  399. around
  400. passing
  401. unspecified
  402. "export"
  403. dirname
  404. "else"
  405. "shift"
  406. obsolete old stuff now
  407. xsel
  408. dig
  409. cut
  410. head
  411. read
  412. eq
  413. ne
  414. xml
  415. version
  416. encoding
  417. UTF
  418. policymap
  419. xmlns
  420. CDATA
  421. FIXED
  422. DOCTYPE ELEMENT ATTLIST NMTOKEN REQUIRED
  423. name
  424. IMPLIED pattern rights stealth
  425. Configure ImageMagick policies
  426. domain
  427. Domains include delegate coder filter path resource
  428. Rights none write execute Use combine them permit
  429. The
  430. glob
  431. repository
  432. restricted
  433. expression
  434. match
  435. paths
  436. starts
  437. Suppose
  438. users
  439. process
  440. MPEG
  441. video
  442. images
  443. expression
  444. Lets
  445. prevent
  446. executing any image filters
  447. large cached disk rather than memory
  448. Define arguments map area width height resources
  449. SI prefixes
  450. In addition maximums
  451. each instance
  452. exceeds maximum
  453. 1GB
  454. 2GB
  455. 100MB
  456. Rules processed Here restrict
  457. small subset proven safe
  458. Extra "case" Done gnome settings daemon passphrase "true" shared secret
  459. GTK_MODULES GNOME_DESKTOP_SESSION_ID
  460. canberra-gtk-module
  461. must
  462. wildcards
  463. FIXME
  464. cmds
  465. xrdb
  466. sysresources
  467. merge
  468. git
  469. sysmodmap usermodmap Xmodmap "HOME" Xresources defaults keymaps
  470. xmodmap
  471. userresources
  472. start some nice programs
  473. manjaro
  474. twm
  475. xclock
  476. xterm
  477. geometry
  478. "exec"
  479. sh
  480. nolisten
  481. login
  482. Section
  483. InputClass
  484. Identifier
  485. keyboard
  486. MatchIsKeyboard
  487. Option
  488. us
  489. pc105
  490. XkbLayout XkbModel manually too freely Read parsed systemd localed
  491. "It's"
  492. wise
  493. edit
  494. EndSection valid Keyboard layout
  495. "Don't"
  496. modify keyboardctl
  497. XkbVariant basic since accepted say xkb_variant string
  498. XkbOptions terminate
  499. Extensions
  500. Composite RENDER COMPOSITE Enable fails sensitive
  501. Device radeon Device0 arch driver
  502. systemctl DISPLAY XAUTHORITY dbus actication environment
  503. esac
  504. DESKTOP_SESSION
  505. synchronize
  506. True
  507. X11
  508. xinit
  509. xinitrc
  510. "isn't"
  511. Driver
  512. testing
  513. amdgpu
  514. AMD
  515. fail
  516. KMS
  517. tho
  518. dmesg
  519. says
  520. enabled
  521. kms
  522. common
  523. gfx
  524. card
  525. gets
  526. always
  527. choose
  528. weak
  529. guess
  530. why
  531. BusID
  532. PCI
  533. DRI
  534. nope
  535. integer
  536. keyword
  537. looking
  538. at
  539. wrong
  540. dri3
  541. line
  542. seems
  543. xorg
  544. diff
  545. very
  546. option
  547. being
  548. former
  549. missing
  550. enables
  551. overrides
  552. disabled
  553. keep
  554. dri2
  555. avoid
  556. tooltip
  557. corruption
  558. bug
  559. XXX
  560. temp
  561. disable
  562. program
  563. eg
  564. issues
  565. detail
  566. EXA
  567. AccelMethod
  568. Glamor
  569. Default
  570. GPU
  571. Manjaro
  572. has artifacts parole while playing videos bottom vsync overall
  573. EXAVSync otherwise Only works activated
  574. RenderAccel hardware
  575. ColorTiling RV300 later cards
  576. ColorTiling2D EXAPixmaps increases 2D performance may cause
  577. options
  578. XAA
  579. AccelDFS
  580. information
  581. SwapbuffersWait
  582. EnablePageFlip
  583. supported
  584. older
  585. SWcursor
  586. software cursor necessary rare occasions hence
  587. MigrationHeuristic greedy If like scrolling terminal browser applies
  588. Backlight effect radeon_bl radeonfb simple fb fbcon right
  589. ShadowPrimary TearFree Group Mode "0666"
  590. Monitor
  591. fix mouse flickers
  592. VGA HDMI disconnected LVDS laptop monitor connected
  593. Modeline clock detected Xorg.0.log
  594. hsync
  595. DPMS
  596. attempt
  597. getting
  598. startx
  599. goes
  600. into
  601. stays here
  602. Display switch
  603. work PreferredMode below
  604. CVT
  605. cvt
  606. screen still
  607. garbled
  608. Screen Laptop VirtualBox graphics Configured DefaultDepth SubSection Depth Modes 1024x768 800x600 640x480 EndSubSection
  609. module
  610. PS
  611. PDF
  612. XPS
  613. anonymous
  614. import
  615. activation
  616. Module skip load turn loads correct glx fglrx unless ofc remove catalyst package install mhwd ones mesa
  617. Disable Load dbe
  618. AccelerationScheme
  619. BEGIN CERTIFICATE
  620. END
  621. TRUSTED
  622. "chmod"
  623. pushd
  624. popd
  625. init
  626. bare
  627. mirror
  628. how many commits ahead current repo compared upstream
  629. origin
  630. pwd
  631. folder
  632. basename
  633. hidden
  634. needed
  635. ignored
  636. had once
  637. Hmm
  638. optional
  639. err
  640. get
  641. shadow
  642. generic
  643. pam.d
  644. vim
  645. bundle
  646. ale
  647. build
  648. )
  649. sedwords="show" #XXX one word must be set here!
  650. excludedlist=(
  651. '\.kbx'
  652. '\.JPG'
  653. '\.jpg'
  654. '\.gif'
  655. '\.pem'
  656. '\.tgz'
  657. '\.gz'
  658. '\.sign'
  659. '\.bz2'
  660. '/ca-certificates/'
  661. '\.svg'
  662. )
  663. excluded='\.gpg' #XXX: one excluded item is here
  664. for word in "${excludewords[@]}"; do
  665. sedwords="${word}|${sedwords}"
  666. done
  667. for each in "${excludedlist[@]}"; do
  668. excluded="${each}|$excluded"
  669. done
  670. find . -type f -print0|grep --null-data -vE "(${excluded})" | xargs -P1 -n1 -0 --no-run-if-empty --exit -- cat2 --show-args-first -- | sed -re "s/\\<(${sedwords})\\>|\\s[a-zA-Z0-9]\\s|-[a-zA-Z0-9]\\>/ /g;s/\\s--\\s/ /g;s/\\s+/ /g" | less
  671. #;s/[^\\s]\\s+[\\s$]//g" | less
  672. #XXX: --show-args-first for cat must be first arg and it runs cat wrapper from ~/bin/binprio/cat script !